it.list.jft
Interface Mask


public interface Mask

A set of fields of a EntityClass.

A mask may be used in subscriptions (SubscriptionParam.setMask()) or transactions (TransactionParam.setMask()).

Empty masks are created by JFT.makeEmptyMask() and then filled with addFieldByName().


Method Summary
 void addFieldByName(String fieldName)
          Add a specific field to the mask.
 int getEntityClassID()
          Returns the ID of the EntityClass related to this mask.
 byte[] getMask()
           
 boolean isBound()
          Returns the bound-indication of this mask.
 void reset()
          Reset this mask to an emtpy mask.
 void setMask(byte[] mask)
           
 

Method Detail

reset

void reset()
           throws IllegalStateException
Reset this mask to an emtpy mask.

Throws:
IllegalStateException - if this mask is bound.

addFieldByName

void addFieldByName(String fieldName)
                    throws IllegalArgumentException,
                           IllegalStateException
Add a specific field to the mask.

A masked field of this EntityClass related to this mask may be:

Spaces (blank, tab, carriage return, etc...) are not allowed inside a masked field representation.

As an example please consider the following two EntityClasses:

class TypeA implements EntityClass {
  int n;
  int v[10];
  String s;
}
class TypeB implements EntityClass {
  TypeA a[10];
  TypeA x;
  double d[10];
  char c[10];
  byte b;
  String ss;
}

Here a list of valid masked fields of TypeB:

Here a list of invalid masked fields of TypeB:

Parameters:
fieldName - field of the related EntityClass,
Throws:
IllegalArgumentException - if fieldName is null or it does not exists in the related EntityClass.
IllegalStateException - if this mask is bound.

getEntityClassID

int getEntityClassID()
Returns the ID of the EntityClass related to this mask.

The returned value is the same entityClassID used as parameter of JFT.makeEmptyMask(int) invocation that created this mask.

Returns:
the ID of the EntityClass related to this mask.

isBound

boolean isBound()
Returns the bound-indication of this mask.

A mask is bound if it was used as creation parameter in a SubscriptionParam.setMask() or in a TransactionParam.setMask().

reset() and addFieldByName() methods invocation on bound masks will throw a IllegalStateException.

Returns:
the bound-indication of this mask.

setMask

void setMask(byte[] mask)
             throws IllegalArgumentException,
                    IllegalStateException
Throws:
IllegalArgumentException
IllegalStateException

getMask

byte[] getMask()


Submit a bug or feature to FT\API Programming Support<\font>