use of javax.enterprise.inject.Produces in project quickstarts by jboss-switchyard.
the class ConnectionInfoMetadataProducer method createConnectionInfoFieldList.
@Produces
@Named("connectionInfoFieldMetaData")
public List<FieldMetaData> createConnectionInfoFieldList() {
List<FieldMetaData> connFields = new ArrayList<FieldMetaData>();
FieldMetaData connid = RfcFactory.eINSTANCE.createFieldMetaData();
connid.setName("CONNID");
connid.setType(DataType.NUM);
connid.setByteLength(1);
connid.setByteOffset(0);
connid.setUnicodeByteLength(2);
connid.setUnicodeByteOffset(0);
connFields.add(connid);
FieldMetaData airline = RfcFactory.eINSTANCE.createFieldMetaData();
airline.setName("AIRLINE");
airline.setType(DataType.CHAR);
airline.setByteLength(20);
airline.setByteOffset(1);
airline.setUnicodeByteLength(40);
airline.setUnicodeByteOffset(2);
connFields.add(airline);
FieldMetaData planetype = RfcFactory.eINSTANCE.createFieldMetaData();
planetype.setName("PLANETYPE");
planetype.setType(DataType.CHAR);
planetype.setByteLength(10);
planetype.setByteOffset(21);
planetype.setUnicodeByteLength(20);
planetype.setUnicodeByteOffset(42);
connFields.add(planetype);
FieldMetaData cityfrom = RfcFactory.eINSTANCE.createFieldMetaData();
cityfrom.setName("CITYFROM");
cityfrom.setType(DataType.CHAR);
cityfrom.setByteLength(20);
cityfrom.setByteOffset(31);
cityfrom.setUnicodeByteLength(40);
cityfrom.setUnicodeByteOffset(62);
connFields.add(cityfrom);
FieldMetaData depdate = RfcFactory.eINSTANCE.createFieldMetaData();
depdate.setName("DEPDATE");
depdate.setType(DataType.DATE);
depdate.setByteLength(8);
depdate.setByteOffset(51);
depdate.setUnicodeByteLength(16);
depdate.setUnicodeByteOffset(102);
connFields.add(depdate);
FieldMetaData deptime = RfcFactory.eINSTANCE.createFieldMetaData();
deptime.setName("DEPTIME");
deptime.setType(DataType.TIME);
deptime.setByteLength(6);
deptime.setByteOffset(59);
deptime.setUnicodeByteLength(12);
deptime.setUnicodeByteOffset(118);
connFields.add(deptime);
FieldMetaData cityto = RfcFactory.eINSTANCE.createFieldMetaData();
cityto.setName("CITYTO");
cityto.setType(DataType.CHAR);
cityto.setByteLength(20);
cityto.setByteOffset(65);
cityto.setUnicodeByteLength(40);
cityto.setUnicodeByteOffset(130);
connFields.add(cityto);
FieldMetaData arrdate = RfcFactory.eINSTANCE.createFieldMetaData();
arrdate.setName("ARRDATE");
arrdate.setType(DataType.DATE);
arrdate.setByteLength(8);
arrdate.setByteOffset(85);
arrdate.setUnicodeByteLength(16);
arrdate.setUnicodeByteOffset(170);
connFields.add(arrdate);
FieldMetaData arrtime = RfcFactory.eINSTANCE.createFieldMetaData();
arrtime.setName("ARRTIME");
arrtime.setType(DataType.TIME);
arrtime.setByteLength(6);
arrtime.setByteOffset(93);
arrtime.setUnicodeByteLength(12);
arrtime.setUnicodeByteOffset(186);
connFields.add(arrtime);
return connFields;
}
use of javax.enterprise.inject.Produces in project quickstarts by jboss-switchyard.
the class ConnectionInfoMetadataProducer method createConnectionInfo.
@Produces
@Named("connectionInfo")
public RecordMetaData createConnectionInfo(@Named("connectionInfoFieldMetaData") List<FieldMetaData> connectionInfoFieldMetaData) {
RecordMetaData conninfo = RfcFactory.eINSTANCE.createRecordMetaData();
conninfo.setName("CONNECTION_INFO");
conninfo.setRecordFieldMetaData(connectionInfoFieldMetaData);
return conninfo;
}
use of javax.enterprise.inject.Produces in project quickstarts by jboss-switchyard.
the class FlightInfoMetadataProducer method createFlightInfo.
@Produces
@Named("flightInfo")
public RecordMetaData createFlightInfo(@Named("flightInfoFieldMetaData") List<FieldMetaData> flightInfoFieldMetaData) {
RecordMetaData flightinfo = RfcFactory.eINSTANCE.createRecordMetaData();
flightinfo.setName("FLTINFO_STRUCTURE");
flightinfo.setRecordFieldMetaData(flightInfoFieldMetaData);
return flightinfo;
}
use of javax.enterprise.inject.Produces in project quickstarts by jboss-switchyard.
the class FunctionTemplateMetadataProducer method createExportParameterList.
@Produces
@Named("exportParameterList")
public List<ListFieldMetaData> createExportParameterList(@Named("flightInfo") RecordMetaData flightInfo, @Named("connectionInfo") RecordMetaData connectionInfo) {
List<ListFieldMetaData> exports = new ArrayList<ListFieldMetaData>();
ListFieldMetaData tripnumber = RfcFactory.eINSTANCE.createListFieldMetaData();
tripnumber.setName("TRIPNUMBER");
tripnumber.setType(DataType.NUM);
tripnumber.setByteLength(8);
tripnumber.setUnicodeByteLength(16);
exports.add(tripnumber);
ListFieldMetaData ticketPrice = RfcFactory.eINSTANCE.createListFieldMetaData();
ticketPrice.setName("TICKET_PRICE");
ticketPrice.setType(DataType.BCD);
ticketPrice.setByteLength(12);
ticketPrice.setUnicodeByteLength(12);
ticketPrice.setDecimals(4);
exports.add(ticketPrice);
ListFieldMetaData ticketTax = RfcFactory.eINSTANCE.createListFieldMetaData();
ticketTax.setName("TICKET_TAX");
ticketTax.setType(DataType.BCD);
ticketTax.setByteLength(12);
ticketTax.setUnicodeByteLength(12);
ticketTax.setDecimals(4);
exports.add(ticketTax);
ListFieldMetaData currency = RfcFactory.eINSTANCE.createListFieldMetaData();
currency.setName("CURRENCY");
currency.setType(DataType.CHAR);
currency.setByteLength(5);
currency.setUnicodeByteLength(10);
exports.add(currency);
ListFieldMetaData passform = RfcFactory.eINSTANCE.createListFieldMetaData();
passform.setName("PASSFORM");
passform.setType(DataType.CHAR);
passform.setByteLength(15);
passform.setUnicodeByteLength(30);
exports.add(passform);
ListFieldMetaData passname = RfcFactory.eINSTANCE.createListFieldMetaData();
passname.setName("PASSNAME");
passname.setType(DataType.CHAR);
passname.setByteLength(25);
passname.setUnicodeByteLength(50);
exports.add(passname);
ListFieldMetaData passbirth = RfcFactory.eINSTANCE.createListFieldMetaData();
passbirth.setName("PASSBIRTH");
passbirth.setType(DataType.DATE);
passbirth.setByteLength(8);
passbirth.setUnicodeByteLength(16);
exports.add(passbirth);
ListFieldMetaData fltinfo = RfcFactory.eINSTANCE.createListFieldMetaData();
fltinfo.setName("FLTINFO");
fltinfo.setType(DataType.STRUCTURE);
fltinfo.setRecordMetaData(flightInfo);
exports.add(fltinfo);
ListFieldMetaData conninfo = RfcFactory.eINSTANCE.createListFieldMetaData();
conninfo.setName("CONNINFO");
conninfo.setType(DataType.TABLE);
conninfo.setRecordMetaData(connectionInfo);
exports.add(conninfo);
return exports;
}
use of javax.enterprise.inject.Produces in project quickstarts by jboss-switchyard.
the class FunctionTemplateMetadataProducer method createBookFlightFunctionTemplate.
@Produces
@Named("bookFlightFunctionTemplate")
public FunctionTemplate createBookFlightFunctionTemplate(@Named("importParameterList") List<ListFieldMetaData> importParameterList, @Named("exportParameterList") List<ListFieldMetaData> exportParameterList) {
FunctionTemplate template = RfcFactory.eINSTANCE.createFunctionTemplate();
template.setImportParameterList(importParameterList);
template.setExportParameterList(exportParameterList);
return template;
}
Aggregations