Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [tigerstripe-users] API access to model artifact multiplicitysetting

Title: API access to model artifact multiplicity setting
Hi Jerome,
 
From IField you do getType().getTypeMultiplicity().
 
e.g.
 
/**
  * Return true if this has "multiplicity" anything other than SINGLE
  */
 public boolean isMany(){
  
  boolean many = this.getType().getTypeMultiplicity().equals(EMultiplicity.ZERO_STAR) ||
  this.getType().getTypeMultiplicity().equals(EMultiplicity.ONE_STAR) ||
  this.getType().getTypeMultiplicity().equals(EMultiplicity.STAR);
  
  return many;
 }
 
Duncan


From: tigerstripe-users-bounces@xxxxxxxxxxx [mailto:tigerstripe-users-bounces@xxxxxxxxxxx] On Behalf Of Jerome Magnet
Sent: 13 July 2009 19:29
To: tigerstripe-users@xxxxxxxxxxx
Subject: [tigerstripe-users] API access to model artifact multiplicitysetting

Hi all,

As I am developing a plugin for code generation I don't see how using the API I can retrieve the mutiplicity setting of a model artifact.

In particular, I want to evaluate the setting of all attributes of a datatype or entity.
So, having the IField instance, which also implements the IModelComponent, I don't know which method can give me that information.

I see methods like getVisibility (another model attribute setting). I also see that IModelComponent has internal Enum IModelComponent.Emultiplicity. But, I don't see the method that returns the runtime value using this enum for a given Ifield instance?

Thanks,
Jerome


Back to the top