org.eclipse.tigerstripe.model
Interface IField

All Superinterfaces:
IModelComponent, IStereotypeCapable

public interface IField
extends IModelComponent

A Field for an AbstractArtifact

Author:
Eric Dillon

Field Summary
static int NON_APPLICABLE
          Static integer value for non-applicable reference type.
static int REFBY_KEY
          Static integer value for Ref By Key type.
static int REFBY_KEYRESULT
          Static integer value for Ref By Key Result type.
static int REFBY_VALUE
          Static integer value for Ref By Value type.
static java.lang.String[] refByLabels
          String values corresponding to the refBy types
 
Fields inherited from interface org.eclipse.tigerstripe.model.IModelComponent
VISIBILITY_PACKAGE, VISIBILITY_PRIVATE, VISIBILITY_PROTECTED, VISIBILITY_PUBLIC
 
Method Summary
 IField clone()
          Clones this Field.
 IAbstractArtifact getContainingArtifact()
          Returns the IArtifact that is the "container" for the Field.
 java.lang.String getDefaultValue()
          Returns the default value for this field if it exists, null otherwise.
 IType getIType()
           
 java.lang.String getLabelString()
           
 int getRefBy()
          Returns an integer value indicating the reference type of the field.
 java.lang.String getRefByString()
          Returns an String value indicating the reference type of the field.
 boolean isOptional()
          Returns a boolean indicating if this field is optional or mandatory.
 boolean isOrdered()
          Returns a boolean indicating if this field is ordered (multiplicity > 1).
 boolean isReadOnly()
          Returns a boolean indicating if this field is read-only.
 boolean isUnique()
          Returns a boolean indicating if this field contains unique values (multiplicity > 1).
 IType makeIType()
           
 void setDefaultValue(java.lang.String value)
           
 void setIType(IType type)
           
 void setOptional(boolean optional)
           
 void setOrdered(boolean isOrdered)
           
 void setReadOnly(boolean readonly)
           
 void setRefBy(int refBy)
           
 void setUnique(boolean isUnique)
           
 java.util.List<org.eclipse.tigerstripe.internal.api.utils.TigerstripeError> validate()
           
 
Methods inherited from interface org.eclipse.tigerstripe.model.IModelComponent
addStereotypeInstance, getComment, getName, getVisibility, isInActiveFacet, removeStereotypeInstance, removeStereotypeInstances, setComment, setName, setVisibility
 
Methods inherited from interface org.eclipse.tigerstripe.profile.stereotype.IStereotypeCapable
getStereotypeInstances
 

Field Detail

NON_APPLICABLE

static final int NON_APPLICABLE
Static integer value for non-applicable reference type.

See Also:
Constant Field Values

REFBY_KEY

static final int REFBY_KEY
Static integer value for Ref By Key type.

See Also:
Constant Field Values

REFBY_KEYRESULT

static final int REFBY_KEYRESULT
Static integer value for Ref By Key Result type.

See Also:
Constant Field Values

REFBY_VALUE

static final int REFBY_VALUE
Static integer value for Ref By Value type.

See Also:
Constant Field Values

refByLabels

static final java.lang.String[] refByLabels
String values corresponding to the refBy types

Method Detail

setRefBy

void setRefBy(int refBy)

setIType

void setIType(IType type)

setDefaultValue

void setDefaultValue(java.lang.String value)

makeIType

IType makeIType()

getIType

IType getIType()

getLabelString

java.lang.String getLabelString()

setOptional

void setOptional(boolean optional)

setReadOnly

void setReadOnly(boolean readonly)

setOrdered

void setOrdered(boolean isOrdered)

setUnique

void setUnique(boolean isUnique)

validate

java.util.List<org.eclipse.tigerstripe.internal.api.utils.TigerstripeError> validate()

clone

IField clone()
Clones this Field.

Returns:

getContainingArtifact

IAbstractArtifact getContainingArtifact()
Returns the IArtifact that is the "container" for the Field.

Returns:
the containing artifact.

getDefaultValue

java.lang.String getDefaultValue()
Returns the default value for this field if it exists, null otherwise.


getRefBy

int getRefBy()
Returns an integer value indicating the reference type of the field. Possible values are defined in the static fields of this class.

Returns:
int - the integer value corresponding to the refBy

getRefByString

java.lang.String getRefByString()
Returns an String value indicating the reference type of the field. Possible values are defined in the refByLabels field of this class.

Returns:
String - the refBy type

isOptional

boolean isOptional()
Returns a boolean indicating if this field is optional or mandatory.

Returns:
boolean - true if optional

isOrdered

boolean isOrdered()
Returns a boolean indicating if this field is ordered (multiplicity > 1).

Returns:
boolean - true if field is ordered.

isReadOnly

boolean isReadOnly()
Returns a boolean indicating if this field is read-only.

Returns:
boolean - true if read-only

isUnique

boolean isUnique()
Returns a boolean indicating if this field contains unique values (multiplicity > 1).

Returns:
boolean - true if field contains unique values (multiplicity > 1).