CopyObject(Object) method

What are the differences b/w clientSession.copyObject(o) and uow.copyObject(o) ? And their usages... Is it common to use uow.copyObject(o)?
Thanks for your information.
Haiwei

Haiwei,
All of the TopLink sessions, including the UnitOfwork, implement the oracle.toplink.sessions.Session interface. This is a method of that interface and shared a common implementation between all of the public concrete implementations. There should no difference in calling copyObject on any session.
Doug

Similar Messages

  • Want to know how to debug the Business Object Method called from CRM

    Hi all,
    I have to debug a Method of a custom Business Object. This is being called when a certain action is performed
    on the CRM  ( CIC0 screen). I can not see an option to set an external break point in the Program of the Business Object
    Method.
    This Business Object calls a standard SAP FM. I tried setting an external break point in that FM and tried executing that.
    But it  is not stopping there.
    Can any one please let me know how I can debug this when triggered from CRM?
    Thanks  in advance.
    Thanks & regards,
    Y Gautham

    Hi,
    I have tried checking the option 'IP MATCHING' option. I have given my user id and also the 'WEBUSER' as well.
    But still I am unable to debug the application.
    Can you please let me know if I am missing anything further.
    Thanks & regards,
    Y Gautham

  • HOWTO: Expose Entity Object Methods to Clients

    By design, clients cannot directly access entity objects. The view object layer provides an extra layer of security--you can choose exactly what data and methods you want clients to see.
    This HOWTO describes the process of exposing an entity object method to client programs.
    First, if you don't already have one, you must base a view object on your entity object and add the view object to your data model. For full details of how to do this, see the help topics under
    +Developing Business Components
    --Working with View Objects, View Links, Application Modules, and Clients
    +----Creating and Modifying View Objects, View Links, Application Modules, and Clients
    For the purposes of this HOWTO, we'll assume that you already have an entity object, Employees, with a method on it, calculateBonus(),
    and a view object EmployeesView based on Employees.
    First, you must generate a view row class. A view row represents one row of the view object's cache; it corresponds to a view of a particular entity object.
    To generate a view row class:
    1. Right-click EmployeesView and choose Edit.
    2. In the View Object Editor, select the Java page.
    3. Select Generate Java File and Generate Accessors for the view row class.
    4. Click Done. This creates a class called EmployeesViewRowImpl.
    Next, you should add a "delegator" method to the view row class--a public method with the exact same signature as the entity method, that simply calls the entity method. For example:
    public int calculateBonus(int rating) {
    return getEmployees().calculateBonus(rating);
    Next, you should export this method.
    1. Right-click EmployeesView and choose Edit.
    2. In the View Object Editor, select the Client Row Methods page.
    3. Shuttle the method you just created into the Selected list and click Done.
    This creates an interface called EmployeesViewRow that contains your method.
    Now you can call the method from your client. You should cast the row returned by EmployeesView.current(), the <jbo:Row> tag, or a similar method or data tag to EmployeesViewRow.
    For example,
    <jbo:Row id="myRow" datasource="ds" action=Current>
    <% out.println(((EmployeesViewRow) myRow).calculateBonus(3)); %>
    </jbo:Row>
    null

    Hi Lisa,
    There's a difference between exporting methods (on an application module, view object, and view row--this is done on the "Client Methods" tab of the view object and application module wizards and the "Client Row Methods" tab of the view object wizard) and making an application module remotable (which is done on the "remote" tab of the application module wizard).
    You should always export methods you want clients to use--and you only need to do this on the application module if you've written methods on your application module (which I didn't in this HOWTO). You can still use these methods in local mode--the interfaces will be present locally. The advantage of exporting methods is that it doesn't lock you into local mode--you'll be able to change to remote mode later (if you decide that's the way to go) with minimal changes--because the interfaces will be present locally even when the implementation classes aren't.
    By contrast, you should only make an application module remotable if you're planning on deploying in a non-local configuration. You can do this step right before deployment.
    Hope this helps,
    Avrom
    null

  • How to manage optional output parameters in an object method ?

    Hi Abapers,
    I've a little coding point to clarify in object programming :
    I've defined an output method parameter as optional.
    I want to prevent execution error with the following test :
    IF et_my_ouput_paramer IS REQUESTED.
       APPEND LINES OF lt_my_data_found TO et_my_ouput_paramer . "*(or other value affectation, no matter)
    ENDIF.
    When activating the code, I obtain the following error :
    "IS REQUESTED" is allowed only with function parameters. This means
    that it is allowed only within the relevant function module and not
    with pure incoming parameters.
    Effectively, I usely use "IS REQUESTED" for module-function... What's the correct syntax in object method ?
    Thanks in advance.

    OK, guys, it was a very tricky and basic error...
    Sorry for this topic, I mistake in declaring type of my parameters.
    Keep programming Quietly !
    Have a nice day.

  • Why is String method called not Object method

    In the below program ::
    class Test
         public void callMethod(Object o)
              System.out.println("Object Method Called");
         public void callMethod(String s)
              System.out.println("String Method Called");
         public static void main(String[] args)
              Test t = new Test();
              t.callMethod(null);
    }

    In the below program ::
    class Test
         public void callMethod(Object o)
              System.out.println("Object Method Called");
         public void callMethod(String s)
              System.out.println("String Method Called");
         public static void main(String[] args)
              Test t = new Test();
              t.callMethod(null);
    }If more than one method could be called the most specific one is called. Since a String is an Object then the String one gets called.

  • Connect to COM(OBJECTS/METHODS) FROM ABAP

    Dear all.
    How can I connect to COM objects/methods from abap?
    Could give me link to example.

    Yes this method raises and exception with this message
    Message ID:          FDT_CORE
    Message number:      085
    DO_IM_DATETIME is not in the context
    The method SET_VALUE corresponds to IF_FDT_CONTEXT. This is the method's calls
          lv_name = 'DO_IM_DATETIME'.
          TRY.
              o_context->set_value( iv_name =  lv_name
                                    ia_value = lv_element_tzone ).
            CATCH cx_fdt INTO lx_fdt.
              RAISE incorrect_parameter.
          ENDTRY.
    I reactivate the aplication, the function, the expression and the data objects.
    But the method is still giving this exception.
    I have only this exception when I try to set up this two parameters:
    DO_IM_DATETIM of type Timepoint
    DO_IM_LANGU which is binding to the element type LANGU
    But in my BRFPlus Function Context I do have this two parameters.
    Thanks !

  • Access an objects method + no line terminator

    Hi,
    I've just found out that if you can use the objects methods by not terminating a line with semicolon;
    StringBuffer sb = new StringBuffer();
    sb.append("A")
        .append("B")
        .append("C");Is this because the terminator closes access to the object and its methods, so not placing a terminator allows a VB style with statement to just access the methods.
    Why/How is this possible?
    Is it good practice?
    Any Help on this would be great,
    Cheers

    It's because the append() method returns an instance of itself. I.e. it's implemented like this:
    public StringBuffer append(String text) {
       // ... do internal operations to add the string
       return this;
    }The semi-colon ends the statement. Since you haven't closed the statement, you have access to the l-value (the returned value from the method) and can invoke methods on the object that it references.
    Is it good practice?It's sometimes useful, but it can be overused.

  • Using null for parameterized "newInstance(Object [])" method in Object[].

    I have a really serious problem. I am creating instances of specific classes by using reflection techniques. I am reading a flat file, finding class from its name and creating it by using its parameterized constructor. Example:
    line 1: Dummy("A",Dummy2("B"),12,,"C");
    I create an instance of Dummy with parameters "A", an instance of Dummy2 object with value "B", 12 (I use here Integer as wrapper), null (There is no wrapper for null :( ) and "C".
    I find constructor by using findConstructors() and looking their parameter counts, creating an object array with given values and calling:
    constructorIFoundBefore.newInstance(objectArrayIPrepared);
    But!!!
    Because I use null directly, I got this message:
    java.lang.IllegalArgumentException: argument type mismatch
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
         at reader.parser.ObjectCreator.createObjectFromObjectItem(ObjectCreator.java:192)
         at reader.parser.ObjectCreator.createObjectFromParseItem(ObjectCreator.java:112)
         at reader.parser.ObjectCreator.createObject(ObjectCreator.java:78)
         at reader.analyzer.FileAnalyzer.analyzeAndCreateObjects(FileAnalyzer.java:95)
         at reader.ReverseReader.main(ReverseReader.java:43)
    I will be very glad if you help me.
    Thanks a lot!
    Gokcer

    I said something wrong. Sorry. While invoking a method (or a constructor) we need an object array which are equivalent to parameters. For example to call a method or constructor for class A;
    class A {
    int age;
    String name;
    public A(int age, String name){
    this.age = age;
    this.name = name;
    public set(int age, String name){
    this.age = age;
    this.name = name;
    we use in any place
    A a1 = new A(12,"Gokcer");
    A a2 = new A(15,null);
    To achieve this by using reflection techniques, we must find constructor with two parameters of class A. At this point "BetterMethodFinder" will give great help.
    After finding right constructor, we must create an object array to tell the constructor parameters (age and name). At this point we need an object array which stores our parameters. Code must be like this.
    Object []params = new Object[2]; // we have two parameters.
    params[0] = new Integer(12); // we can't use params[0]=12
    // because 12 is not an object. (It is a
    // primitive type)
    params[1] = "Gokcer";
    Now create the new object.
    A a1;
    a1 = constructorWeFound.newInstance(params);
    While creating param[], we could also use:
    Object []params = new Object[2] {new Integer(12),"Gokcer"};
    While creating a2, we can use "null" directly for second parameter.
    params = new Object[2] = {new Integer(15), null};
    or
    Object []params = new Object[2];
    params[0] = new Integer(15);params[1] = null;
    Thanks again everyone who replied me.
    My sincerely...

  • Business Object Method is not Visible

    Hi Experts,
    I have created a custom business object and created a method for it in t-code SWO1.
    I am trying to use this object's method in one of workflow tasks. I entered the business object and I do not find the method in the method's list.
    I released the business object, still I do not find the method in pull up menu. Am I missing anything?
    Thanks!
    Babu.

    Hi Babu,
    Is this question being answered. If YES then please marked this question as answered.
    I do have some other solution. Hope this will work.
    Well, if you are trying to directly use the method of the Custom BOR in any of the custom task, then check whether the method have been marked as Instance independent?
    Double click in the method.
    Check the box and tick it for the Method to be instance independent.
    Generate it once again and check...
    Reward points if found useful.
    Regards.
    Abhijit.
    [email protected]

  • How to call object method (eg, CallIntMethod)in C?

    I aslo get problem when I use "CallIntMehtod", the following is my program
    test.java
    public class test {
    public int getvalue(int n)
    System.out.println("cjf, welcome");
    return n*n;
    invoke.c
    #include <jni.h>
    int main() {
    int res;
    JavaVM *jvm;
    JNIEnv *env;
    JavaVMInitArgs vm_args;
    JavaVMOption options[3];
    jclass cls;
    jmethodID mid;
    vm_args.version = JNI_VERSION_1_2;
    vm_args.nOptions = 3;
    // vm_args.options = options;
    vm_args.ignoreUnrecognized = JNI_TRUE;
    res = JNI_CreateJavaVM(&jvm, (void**)&env, &vm_args); /* create VM */
    if (res < 0) {
    fprintf(stderr, "Can't create Java VM\n");
    exit(1);
    printf("success create java VM \n");
    cls = (*env)->FindClass(env, "test");/* find class */
    if ( cls != (jclass)0 ) {
    mid = (*env)->GetMethodID( env, cls, "getvalue", "(I)I" );/* get method ID */
    if( mid != 0 ){
    printf("First call to Java returns:%d\n", (*env)->CallIntMethod(env, cls, mid,2) );/* execute
    method */
    (*jvm)->DestroyJavaVM(jvm);/* destroy java VM */
    fprintf(stdout, "Java VM destory.\n");
    return 0;
    when I compiled them and run it, I cann't get the expected result. the result is:
    nspws1@/home/bss>./invoke
    success create java VM
    First call to Java returns:0
    Java VM destory.
    so ,what' wrong?

    Your method "getvalue" is not static.
    You have to create an object of your class "test" and call the method with this object (not with the class) as parameter: CallIntMethod(env, obj, mid,2).

  • Obtaining Object Methods

    Problem:
    I am working with a list of class which are all subclasses of an abstract class.
    I have created an object of each method by the following code:
    Dent Hor = new Horisontal();
    Dent Hin = new Hinged();
    Dent I = new Instant();
    Dent V = new Vertical();
    ClassType ct = new ClassType();
    Object p, q, r;
    p = ct.makeObject("fa.Instant");
    q = ct.makeObject("fa.Horisontal");
    r = ct.makeObject("fa.Hinged");
    I want to handle each DENT as a DENT, yet each DENT object will know what specific class in the hierachy of DENTs it really belongs to.
    Now i when to get the methods in each of the objects.
    Does anyone know how this can be done?
    Thanks

    Here is a bunch of code, origenally based on what you posted above. It only uses Dent and Horizontal for simplicity, it does the printName as you have above, then it calls a bunch of Dent and Horizontal specific methods. I includ my versions of the Dent and Horizontal classes in the same java file, again, just for simplicity...
    package fa;
    public class Test {
         public Object makeObject(String cn) throws ClassNotFoundException,
                                     InstantiationException,
                                     IllegalAccessException
              Object o = Class.forName(cn).newInstance();
              return o;
         public static void main(String[] args)
              Test ct = new Test();
              Dent Hor = new Horizontal();
              Dent r = null;
              try
                   r = (Dent) ct.makeObject("fa.Horizontal");
              } catch (ClassNotFoundException cnfe)
                   cnfe.printStackTrace();
                   System.exit(1);
              } catch (InstantiationException ie)
                   ie.printStackTrace();
                   System.exit(1);
              } catch (IllegalAccessException iae)
                   iae.printStackTrace();
                   System.exit(1);
              ct.printName(r);
              ct.useMethods(r);
         public void printName(Object o)
              Class c = o.getClass();
              String s = c.getName();
              System.out.println(s);
         public void useMethods(Dent r)
              r.dentMethod0();
              r.dentMethod1();
              r.dentMethod2();
              if (r instanceof Horizontal)
                   ((Horizontal)r).horizMethod3();
    abstract class Dent
         void dentMethod0()
              System.out.println("Dent 0");
         void dentMethod1()
              System.out.println("Dent 1");
         abstract void dentMethod2();
    class Horizontal extends Dent
         void dentMethod1()
              System.out.println("---------------");
              super.dentMethod1();
              System.out.println("Horizontal 1");
              System.out.println("---------------");
         void dentMethod2()
              System.out.println("---------------");
              System.out.println("Horizontal 2");
              System.out.println("---------------");
         void horizMethod3()
              System.out.println("---------------");
              System.out.println("Horizontal 3");
              System.out.println("---------------");
    }

  • Question on View Object method to use to reset a data entry form?

    I am using a transient View Object form for the purpose of collecting and persisting data entered by users in a set of web data forms that span multiple pages. In the Application Module, I create the first row (see below.) After the user submits the last form, I programmatically add the data to the database (later may change to an Entity Object, but right now I don't use one.) So, the data they entered remains in the VO (it only ever has one row.)
    My question is which method do I use to clear out the current set of data values. I tried VO.clearcache() but it deletes the row, and VO.reset() did not clear the data? If the only way is to delete the row, then please advise the best way to re-create the row or re-set the iterator.
    thanks!
    -- sample code to insert initial row in App Module --
    protected void prepareSession(oracle.jbo.Session session) {
    super.prepareSession(session);
    insertTransientViewObjRows();
    private void insertTransientViewObjRows() {
    ViewObject transientvo = getView1();
    transientvo.clearCache();
    transientvo.insertRow(transientvo.createRow());
    ---- in service method after user submits the form and row remains in VO, I have tried: --
    vo1.reset(); // does not delete data from the row
    vo1.clearCache(); // deletes the row

    Thanks. Yes this looks more like what I need. How do I call this method from the client-tier, or from within a service method in my Application Module?
    vo1 = findViewObject("myViewObject");
    row = (MyViewRowImpl)vo1.first();
    row.initDefaults();
    compiler error message received:
    Error(279,21): method initDefaults() has protected access in class oracle.jbo.server.ViewRowImpl
    "Customer applications should not access this class on the client-tier of an application. Instead, the Row interface should be used for client tier access"
    Which Row interface method can I call?
    Message was edited by:
    javaX

  • Business objects -method implimentation

    hi,
    i want to implement the method in a business objects already exist. so i wanted to know what is "function module" proposal. to build that and what are other different methods to implement the method in SWO1.
    i want to call a new FM in this method Please let me know how to implement the same.
    please help me,
    Mahesh

    thanks

  • Calling Business objects Methods from ABAP program

    Hi All,
    Can anyone please tell me the procedure to call methods of business object(Ex: BKPF) from an ABAP program. My requirement is to check the existence of a object key by using the method EXISTENCE CHECK from BKPF. Please help

    Here is an example from the SAP documentation.
    [http://help.sap.com/saphelp_nw70ehp2/helpdata/en/c5/e4ad71453d11d189430000e829fbbd/content.htm]
    Cheers
    Graham Robbo

  • How to call BOR object- method in custom program

    hi all,
    I have the following details:
    BOR object : INSTLN
    Method: createdirect
    I need to call the above method in my custom program.
    I need to call it entirely. Means if it contains fn modules I dont want to call those fn modules seperately.

    Hi Sammy,
    Phil Soady from SAP Australia provided me with this little gem a few years back. The actual documentation for this can be found somewhere in the workflow programming area, but I just looked and couldn't find it for you. Anyway, this is a sample program I built to show how to do this. In this example I call the Display method of the Sales Document BO.
    INCLUDE <cntn02>.
    INCLUDE <cntn03>.
    FUNCTION zcallbomethod.
    *"*"Local interface:
    * Data declaration
      DATA: vbak_ref TYPE swc_object.
    * Declare and initialise container
      swc_container container.
      swc_create_container container.
    * Create object reference to sales document
      swc_create_object vbak_ref 'VBAK' '0000000009'. "Sales Document Number
    * Call Display
      swc_call_method vbak_ref 'Display' container.
    * Error handling
      IF sy-subrc NE 0.
      ENDIF.
    ENDFUNCTION.
    Cheers
    Graham Robbo

Maybe you are looking for

  • WRT310N: Help with DMZ/settings (firmware 1.0.09) for wired connection

    Hello. I have a WRT310N and have been having a somewhat difficult time with my xbox 360's connection. I have forwarded all the necessary ports (53, 80, 88, 3074) for it to run, and tried changing MTU and what-not. I don't know if I have DMZ setup inc

  • Linking to Shared Drive in InDesign

    I know how to create Hyperlinks in InDesign, but what if I want the user/reader to be able to click on a Shared Drive link that will take them directly to a particular shared drive folder on a company's shared drive? Is this possible? It's not an "ht

  • Air Update Problem

    Hi everyone, i just wanted to update an AIR Application for a client. But when the update framework (i'm using the ApplicationUpdaterUI) has downloaded the AIR file and wants to install it, it says that the AIR file is damaged. When i'm installing th

  • Photoshop elements 11 stops working

    Photoshop elements 11 won't work. It keeps erroring out before I can do anything, and Windows doesn't find a solution. If you need clarification or more info about my system, please let me know. Thanks!!!

  • Can't see any imported video or still images in canvas

    Hi, I'm a new Motion 4 user. No matter what video or still images I import into a project, my canvas remains black. I am, however, able to see a wireframe outline of where the video / picture should be situated on the canvas. I am also able to hear a