Hi,
Is there anyway we can specify arguments to the accessor method(get method) in datamodule-config.xml?
<domain>
<type name="movie" class="bb.Movie">
<field name="practice" node="@Practice" type="string"/>
</type>
</domain>
<type name="movie" class="bb.Movie">
<field name="practice" node="@Practice" type="string"/>
</type>
</domain>
Are there any way to invoke the method getPractice(type arg1, type arg2, type arg3, ....), instead of the no argument getter method get called.
Also, how do I read the datamodule-config file programatically.
I am looking to add field description in to the config file as well as read the fields.
this is how I tried, in vain.
Datamodule datamodule = new Datamodule(); // uses the default configuration?
Configuration configuration = datamodule.getConfiguration();
DomainConfig domainConfig = configuration.getDomain();
TypeConfig typeConfig = domainConfig.getType("movie");
Iterator<FieldConfig> fields = typeConfig.getFields().iterator();
while(fields.hasNext()){
FieldConfig fieldConfig = fields.next();
if(fieldConfig.getNodeName().equals("title")){
return title; // return something..
}
}
Configuration configuration = datamodule.getConfiguration();
DomainConfig domainConfig = configuration.getDomain();
TypeConfig typeConfig = domainConfig.getType("movie");
Iterator<FieldConfig> fields = typeConfig.getFields().iterator();
while(fields.hasNext()){
FieldConfig fieldConfig = fields.next();
if(fieldConfig.getNodeName().equals("title")){
return title; // return something..
}
}
But this doesn't work...typeConfig is null.
Do I have to specifically state the configuration file (datamodule-config.xml) somewhere.
I am not getting the com.backbase.datamodule.core.configuration.ConfigurationImpl class in my program. My eclipse complains "com.backbase.datamodule.core.configuration.ConfigurationImpl cannot be resolved to a type"
Please tell me an idea of how to get hold of the configuration file.
Jay

I got the second part of my
3 September, 2008 - 23:40 — JayI got the second part of my question right.. I was not specifying the config file. That was wrong.
I used Datamodule datamodule = new Datamodule(inputstream ), and it worked..
Thanks