variableName.propertyName
where:
MQL supports the Java beans convention (http://java.sun.com/docs/books/tutorial/javabeans).
This means you can access the data model using properties:
myVariable.myProperty
Each non-static public method of the form getFoo()
or isFoo()
is acccessible through the property foo
.
So you can write obj.foo
to call obj.getFoo()
or obj.isFoo()
.
We recommend to use properties in place of method calls, as it makes the code simpler and more readable:
myClass.namespace.name
may sounds nicer than myClass.getNamespace().getName()
.
Properties can only be used to call public methods. Public fields are never accessible though Java Beans, they must have a corresponding getter method. Note that this statement does not apply to static fields, as you can access static fields and methods.
// gets the name of the class (calls getName()) myClass.name // gets the isAbstract value of the class (calls isAbstract()) myClass.isAbstract myClass.abstract