org.eclipse.tigerstripe.model
Interface IType


public interface IType

A Type in a Tigerstripe Model

Author:
Eric Dillon

Field Summary
static int MULTIPLICITY_MULTI
          Deprecated. no use of Multiplicity any more, please use Type Multiplicity
static int MULTIPLICITY_SINGLE
          Deprecated. no use of Multiplicity any more, please use Type Multiplicity
 
Method Summary
 IType clone()
           
 java.lang.String defaultValue()
          Returns a simple default value.
 java.lang.String getFullyQualifiedName()
          Returns the fully qualified name (ie.
 IAbstractArtifact getIArtifact()
          Get the Tigerstripe artifact (of any type).
 int getMultiplicity()
          Deprecated. since 2.2-rc, no use of multiplicity anymore, TypeMultiplicity instead
 java.lang.String getName()
          Returns the name of this type.
 java.lang.String getPackage()
          Returns the package name for this type.
 IAssociationEnd.EMultiplicity getTypeMultiplicity()
          Returns the multiplicity for this type
 boolean isArtifact()
          Test to see of the type represented here is a Tigerstripe artifact (of any type).
 boolean isDatatype()
          Test to see of the type represented here is a Tigerstripe Datatype artifact.
 boolean isEntityType()
          Test to see of the type represented here is a Tigerstripe ManagedEntity artifact.
 boolean isEnum()
          Test to see of the type represented here is a Tigerstripe Enumeration artifact.
 boolean isPrimitive()
          Test to see of the type represented here is a "primitive" type.
 void setFullyQualifiedName(java.lang.String fqn)
           
 void setMultiplicity(int multiplicity)
          Deprecated. since 2.2-rc, no use of multiplicity anymore, TypeMultiplicity instead
 void setTypeMultiplicity(IAssociationEnd.EMultiplicity multiplicity)
           
 java.util.List<org.eclipse.tigerstripe.internal.api.utils.TigerstripeError> validate()
           
 java.util.List<org.eclipse.tigerstripe.internal.api.utils.TigerstripeError> validate(boolean isMethodReturnCheck)
           
 

Field Detail

MULTIPLICITY_MULTI

@Deprecated
static final int MULTIPLICITY_MULTI
Deprecated. no use of Multiplicity any more, please use Type Multiplicity
Static integer value for multiple multiplicity - ie "*"

See Also:
Constant Field Values

MULTIPLICITY_SINGLE

@Deprecated
static final int MULTIPLICITY_SINGLE
Deprecated. no use of Multiplicity any more, please use Type Multiplicity
Static integer value for single multiplicity - ie "0..1"

See Also:
Constant Field Values
Method Detail

setFullyQualifiedName

void setFullyQualifiedName(java.lang.String fqn)

setMultiplicity

@Deprecated
void setMultiplicity(int multiplicity)
Deprecated. since 2.2-rc, no use of multiplicity anymore, TypeMultiplicity instead

Parameters:
multiplicity -

setTypeMultiplicity

void setTypeMultiplicity(IAssociationEnd.EMultiplicity multiplicity)

validate

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

validate

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

clone

IType clone()

defaultValue

java.lang.String defaultValue()
Returns a simple default value. For a type with FQN of "java.lang.String" this will return "Value". For a type with FQN of "int" this will return "0".

Returns:
String representation of a default Value

getFullyQualifiedName

java.lang.String getFullyQualifiedName()
Returns the fully qualified name (ie. package + name) of this type.

Returns:
String - the FQN of the type.

getIArtifact

IAbstractArtifact getIArtifact()
Get the Tigerstripe artifact (of any type).

Returns:
the Artifact if the FQN of this type matches that of a artifact in the same project(including dependencies & refereneces), null otherwise.

getMultiplicity

@Deprecated
int getMultiplicity()
Deprecated. since 2.2-rc, no use of multiplicity anymore, TypeMultiplicity instead

Returns an integer value indicating the multiplicity of this type. Possible values are defined in the static fields of this class.

Returns:
int - the integer value corresponding to the multiplicity.

getName

java.lang.String getName()
Returns the name of this type.

Returns:
String - the name of the type.

getPackage

java.lang.String getPackage()
Returns the package name for this type.

Returns:
String - the package where this artifact was defined.

getTypeMultiplicity

IAssociationEnd.EMultiplicity getTypeMultiplicity()
Returns the multiplicity for this type

Returns:
Since:
2.2-rc

isArtifact

boolean isArtifact()
Test to see of the type represented here is a Tigerstripe artifact (of any type).

Returns:
true if the FQN of this type matches that of a artifact in the same project(including dependencies & refereneces).

isDatatype

boolean isDatatype()
Test to see of the type represented here is a Tigerstripe Datatype artifact.

Returns:
true if the FQN of this type matches that of a Datatype artifact in the same project(including dependencies & refereneces).

isEntityType

boolean isEntityType()
Test to see of the type represented here is a Tigerstripe ManagedEntity artifact.

Returns:
true if the FQN of this type matches that of a ManagedEntity artifact in the same project(including dependencies & refereneces).

isEnum

boolean isEnum()
Test to see of the type represented here is a Tigerstripe Enumeration artifact.

Returns:
true if the FQN of this type matches that of a Enumeration artifact in the same project(including dependencies & refereneces).

isPrimitive

boolean isPrimitive()
Test to see of the type represented here is a "primitive" type. Note that the primitive test here is *not* for primitive types defined in a profile, but for java primitive types: boolean,int,char,float,double,long,short,byte

Returns:
true if the FQN of the type patches any of those in this list.