org.eclipse.tigerstripe.workbench.model.deprecated_
Interface IField

All Superinterfaces:
IModelComponent, IStereotypeCapable

public interface IField
extends IModelComponent

This class represents a Field for an IArtifact. An IField is the model representation of an attribute of a Tigerstripe Artifact.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.tigerstripe.workbench.model.deprecated_.IModelComponent
IModelComponent.EMultiplicity, IModelComponent.EVisibility
 
Field Summary
static java.util.List<IField> EMPTY_LIST
          An empty list this is used as a return for Artifact types that do not support Fields.
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
 
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.
 java.lang.String getLabelString()
          Returns a String that describes the Field.
 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.
 IType getType()
          Returns the type of this 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 makeType()
          Make a blank type object.
 void setDefaultValue(java.lang.String value)
          Sets the default value for this field if it exists, null otherwise.
 void setOptional(boolean optional)
          Sets the optional attribute of the Field.
 void setOrdered(boolean isOrdered)
          Sets the ordered attribute of the Field.
 void setReadOnly(boolean readonly)
          Sets the readonly attribute of the Field.
 void setRefBy(int refBy)
          Sets the reference type of the field.
 void setType(IType type)
          Sets the type of the field.
 void setUnique(boolean isUnique)
          Sets the unique attribute of the Field.
 
Methods inherited from interface org.eclipse.tigerstripe.workbench.model.deprecated_.IModelComponent
getAnnotation, getAnnotations, getAnnotations, getAnnotations, getComment, getMetadata, getName, getProject, getVisibility, hasAnnotations, hasAnnotations, hasAnnotations, isInActiveFacet, setComment, setName, setVisibility, validate
 
Methods inherited from interface org.eclipse.tigerstripe.workbench.profile.stereotype.IStereotypeCapable
addStereotypeInstance, getStereotypeInstanceByName, getStereotypeInstances, hasStereotypeInstance, removeStereotypeInstance, removeStereotypeInstances
 

Field Detail

EMPTY_LIST

static final java.util.List<IField> EMPTY_LIST
An empty list this is used as a return for Artifact types that do not support Fields.


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

getContainingArtifact

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

Returns:
the containing artifact.

getLabelString

java.lang.String getLabelString()
Returns a String that describes the Field. This is the presentation used in the Explorer view. The format is : name::typeName[] = defaultValue name::typeName = defaultValue name::typeName[] name::typeName

Returns:
formatted string

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

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

setRefBy

void setRefBy(int refBy)
Sets the reference type of the field. Possible values are defined in the static fields of this class.


getType

IType getType()
Returns the type of this field.

Returns:
IType - the type of this field

setType

void setType(IType type)
Sets the type of the field. The type could be a primitive type, or represent a model Artifact.

Parameters:
type -

getDefaultValue

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

Returns:
a simple String - this is not checked for its ability to be parsed into a valid instance of the Type.

setDefaultValue

void setDefaultValue(java.lang.String value)
Sets the default value for this field if it exists, null otherwise. This is not checked for its ability to be parsed into a valid instance of the Type.


makeType

IType makeType()
Make a blank type object.

Returns:
- a new IType.

isOptional

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

Returns:
boolean - true if optional

setOptional

void setOptional(boolean optional)
Sets the optional attribute of the Field.

Parameters:
optional -

isReadOnly

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

Returns:
boolean - true if read-only

setReadOnly

void setReadOnly(boolean readonly)
Sets the readonly attribute of the Field.

Parameters:
readonly -

isOrdered

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

Returns:
boolean - true if field is ordered.

setOrdered

void setOrdered(boolean isOrdered)
Sets the ordered attribute of the Field.

Parameters:
isOrdered -

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).

setUnique

void setUnique(boolean isUnique)
Sets the unique attribute of the Field.

Parameters:
isUnique -

clone

IField clone()
Clones this Field.

Returns: