Search in sources :

Example 1 with FieldMetaData

use of org.fusesource.camel.component.sap.model.rfc.FieldMetaData 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;
}
Also used : FieldMetaData(org.fusesource.camel.component.sap.model.rfc.FieldMetaData) ArrayList(java.util.ArrayList) Named(javax.inject.Named) Produces(javax.enterprise.inject.Produces)

Example 2 with FieldMetaData

use of org.fusesource.camel.component.sap.model.rfc.FieldMetaData in project quickstarts by jboss-switchyard.

the class FlightInfoMetadataProducer method createFlightInfoFieldList.

@Produces
@Named("flightInfoFieldMetaData")
public List<FieldMetaData> createFlightInfoFieldList() {
    List<FieldMetaData> flightFields = new ArrayList<FieldMetaData>();
    FieldMetaData flighttime = RfcFactory.eINSTANCE.createFieldMetaData();
    flighttime.setName("FLIGHTTIME");
    flighttime.setType(DataType.NUM);
    flighttime.setByteLength(10);
    flighttime.setByteOffset(0);
    flighttime.setUnicodeByteLength(20);
    flighttime.setUnicodeByteOffset(0);
    flightFields.add(flighttime);
    FieldMetaData cityfrom = RfcFactory.eINSTANCE.createFieldMetaData();
    cityfrom.setName("CITYFROM");
    cityfrom.setType(DataType.CHAR);
    cityfrom.setByteLength(20);
    cityfrom.setByteOffset(10);
    cityfrom.setUnicodeByteLength(40);
    cityfrom.setUnicodeByteOffset(20);
    flightFields.add(cityfrom);
    FieldMetaData depdate = RfcFactory.eINSTANCE.createFieldMetaData();
    depdate.setName("DEPDATE");
    depdate.setType(DataType.DATE);
    depdate.setByteLength(8);
    depdate.setByteOffset(30);
    depdate.setUnicodeByteLength(16);
    depdate.setUnicodeByteOffset(60);
    flightFields.add(depdate);
    FieldMetaData deptime = RfcFactory.eINSTANCE.createFieldMetaData();
    deptime.setName("DEPTIME");
    deptime.setType(DataType.TIME);
    deptime.setByteLength(6);
    deptime.setByteOffset(38);
    deptime.setUnicodeByteLength(12);
    deptime.setUnicodeByteOffset(76);
    flightFields.add(deptime);
    FieldMetaData cityto = RfcFactory.eINSTANCE.createFieldMetaData();
    cityto.setName("CITYTO");
    cityto.setType(DataType.CHAR);
    cityto.setByteLength(20);
    cityto.setByteOffset(44);
    cityto.setUnicodeByteLength(40);
    cityto.setUnicodeByteOffset(88);
    flightFields.add(cityto);
    FieldMetaData arrdate = RfcFactory.eINSTANCE.createFieldMetaData();
    arrdate.setName("ARRDATE");
    arrdate.setType(DataType.DATE);
    arrdate.setByteLength(8);
    arrdate.setByteOffset(64);
    arrdate.setUnicodeByteLength(16);
    arrdate.setUnicodeByteOffset(128);
    flightFields.add(arrdate);
    FieldMetaData arrtime = RfcFactory.eINSTANCE.createFieldMetaData();
    arrtime.setName("ARRTIME");
    arrtime.setType(DataType.TIME);
    arrtime.setByteLength(6);
    arrtime.setByteOffset(72);
    arrtime.setUnicodeByteLength(12);
    arrtime.setUnicodeByteOffset(144);
    flightFields.add(arrtime);
    return flightFields;
}
Also used : FieldMetaData(org.fusesource.camel.component.sap.model.rfc.FieldMetaData) ArrayList(java.util.ArrayList) Named(javax.inject.Named) Produces(javax.enterprise.inject.Produces)

Aggregations

ArrayList (java.util.ArrayList)2 Produces (javax.enterprise.inject.Produces)2 Named (javax.inject.Named)2 FieldMetaData (org.fusesource.camel.component.sap.model.rfc.FieldMetaData)2