Java

Sample External Object (Java) Source Code

Sample External Object (Java) Source Code   package MRCWORKLIB; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import org.apache.log4j.Logger; import com.mrc.dbo.MrcConnection; /**  * Delete Order # from MRCWORKLIB.ORDDET  * 2011-09-22  * @author RH  *  * 2. Define external object  *  * Class Name: MRCWORKLIB.DELDETAIL  * Method Name: run  * Then define one object parm to […]

Sample External Object (Java)

Calling a Sample External Object (Java)   This document will explain how to create, register, and call a sample External Object written in Java. Recall from basic training that the purpose of an External Object is to call your back-end business logic directly through an m-Power web application. In this case, the purpose of this […]

Validating via a Java External Object

Validating via a Java External Object   This document will explain how to call an external object Java program for validity checking. For basic information regarding validity checking please see this document. The source code for the Java used in this example can be found here. The purpose of this object is to check to […]

Validating via a Java External Object Source Code

Validating via a Java External Object Source Code   package MRCWORKLIB; public class Validate {     public void valid_fields(String[] args)     {         String strdatex = args[1].replaceAll(",", "");         String enddatex = args[2].replaceAll(",", "");         int strdate = Integer.parseInt(strdatex);         int enddate= Integer.parseInt(enddatex);         if ((strdatex.compareTo("0") == 0 ) && (enddatex.compareTo("0") == 0 ))             {             args[0] = "You have not entered any […]

Add/Subtract Dates using the Java Date Translator

Add/Subtract Dates using the Java Date Translator **Note: This Feature Has Been Deprecated. Please use this link to find alternative features: http://www.mrc-productivity.com/techblog/?p=522     The Java Date Translator is a very powerful tool, commonly used to determine the difference between two dates (Most date conversion can now be accomplished with a UDF). However, there is […]

Java File Copy

Java File Copy   The Java File Copy feature makes it simple to copy data tables from one DB to another. This feature works on any OS and any DB supported by m-Power. The JDBC connection property information is required for each execution of this feature and includes that as part of the parameters set. […]

Java Date Translator

Java Date Translator (External Object) **NOTE: This Functionality Has Been Deprecated. Please use this link to see alternative features: http://www.mrc-productivity.com/docs/external-objects-udf/mrc-date-conversion-udfs   mrc supplies a date translator specifically for use with generated Web/Servlet applications. This Java class is named mrc.servlet.MrcDateTranslator and resides in mrcextobj.jar. The object definition is shown below. If this object definition is not […]