@@ -33,10 +33,12 @@ public class EnterpriseConnect
3333
3434 public EnterpriseConnect (ModelContext context )
3535 {
36- Object destination = context .getContextProperty ("SAPSessionName" );
37- if (destination !=null )
38- {
39- destinationName = (String )destination ;
36+ if (context !=null ) {
37+ Object destination = context .getContextProperty ("SAPSessionName" );
38+ if (destination !=null )
39+ {
40+ destinationName = (String )destination ;
41+ }
4042 }
4143 }
4244
@@ -171,8 +173,11 @@ else if (jcoType == JCoMetaData.TYPE_DATE)
171173 {
172174 jTable .setValue (key , jObj .getString (key ));
173175 }
174- else if (jcoType == JCoMetaData .TYPE_INT2 || jcoType == JCoMetaData .TYPE_INT1
175- || jcoType == JCoMetaData .TYPE_BYTE )
176+ else if (jcoType == JCoMetaData .TYPE_BYTE )
177+ {
178+ jTable .setValue (key , jObj .getString (key ));
179+ }
180+ else if (jcoType == JCoMetaData .TYPE_INT2 || jcoType == JCoMetaData .TYPE_INT1 )
176181 {
177182 jTable .setValue (key , jObj .getInt (key ));
178183 }
@@ -228,8 +233,11 @@ else if (jcoType == JCoMetaData.TYPE_DATE)
228233 {
229234 jStruct .setValue (key , jObj .getString (key ));
230235 }
231- else if (jcoType == JCoMetaData .TYPE_INT2 || jcoType == JCoMetaData .TYPE_INT1
232- || jcoType == JCoMetaData .TYPE_BYTE )
236+ else if (jcoType == JCoMetaData .TYPE_BYTE )
237+ {
238+ jStruct .setValue (key , jObj .getString (key ));
239+ }
240+ else if (jcoType == JCoMetaData .TYPE_INT2 || jcoType == JCoMetaData .TYPE_INT1 )
233241 {
234242 jStruct .setValue (key , jObj .getInt (key ));
235243 }
@@ -275,8 +283,11 @@ public void getValue(String parameterName, GXSimpleCollection<?>[] value)
275283 {
276284 jRow .put (field .getName (), field .getLong ());
277285 }
278- else if (field .getType () == JCoMetaData .TYPE_INT2 || field .getType () == JCoMetaData .TYPE_INT1
279- || field .getType () == JCoMetaData .TYPE_BYTE )
286+ else if (field .getType () == JCoMetaData .TYPE_BYTE )
287+ {
288+ jRow .put (field .getName (), field .getByte ());
289+ }
290+ else if (field .getType () == JCoMetaData .TYPE_INT2 || field .getType () == JCoMetaData .TYPE_INT1 )
280291 {
281292 jRow .put (field .getName (), field .getInt ());
282293 }
@@ -340,6 +351,11 @@ public void getValue(String parameterName, java.util.Date[] value)
340351 value [0 ] = function .getExportParameterList ().getDate (parameterName );
341352 }
342353
354+ public void getValue (String parameterName , byte [] value )
355+ {
356+ value [0 ] = function .getExportParameterList ().getByte (parameterName );
357+ }
358+
343359 public void getValue (String parameterName , int [] value )
344360 {
345361 value [0 ] = function .getExportParameterList ().getInt (parameterName );
0 commit comments