public interface Mask
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()
.
Modifier and Type | Method and Description |
---|---|
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) |
void reset() throws IllegalStateException
IllegalStateException
- if this mask is bound.void addFieldByName(String fieldName) throws IllegalArgumentException, IllegalStateException
A masked field of this EntityClass
related to this mask may be:
String
field of this EntityClass.
As an example please consider the following two EntityClasses:
Here a list of valid masked fields of
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;
}
TypeB
:
"ss"
"b"
"d[2]"
"x.n", "x.v[3]", "x.s"
"a[8].n", "a[0].v[9]", "a[5].s"
TypeB
:
"s s", "t"
"x"
"c[2]", "d[+2]", "d[20]", "d[2", "d[ 2 ]", "ss[3]"
"a.n", "x.y"
"a[8]. n", "a[8]", "a[0].v", "a[5].s[3]"
fieldName
- field of the related EntityClass
,IllegalArgumentException
- if fieldName
is null
or it does
not exists in the
related EntityClass
.IllegalStateException
- if this mask is bound.int getEntityClassID()
EntityClass
related to this mask.
The returned value is the same entityClassID
used as
parameter of JFT.makeEmptyMask(int)
invocation that created this mask.
EntityClass
related to this mask.boolean isBound()
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
.
void setMask(byte[] mask) throws IllegalArgumentException, IllegalStateException
IllegalArgumentException
IllegalStateException
byte[] getMask()
Submit a bug or feature to FT\API Programming Support