How to built cyclic stream of object type: [i]BufferedOutputStream[/i]?

How to built cyclic stream of object type: BufferedOutputStream?
Need to know if there is a pointer that can be set, so will be able to override the stream from a certain byte. What procedures to use?
Thanks,
Sarit.

Multiposthttp://forum.java.sun.com/thread.jspa?threadID=627863

Similar Messages

  • Dynamically built query on execution How to save the data in Object Type

    Hi,
    In pl/sql I am building and executing a query dynamically. How can I stored the output of the query in object type. I have defined the following object type and need to store the
    output of the query in it. Here is the Object Type I have
    CREATE OR REPLACE TYPE DEMO.FIRST_RECORDTYPE AS OBJECT(
    pkid NUMBER,
    pkname VARCHAR2(100);
    pkcity VARCHAR2(100);
    pkcounty VARCHAR2(100)
    CREATE OR REPLACE TYPE DEMO.FIRST_RECORDTYPETAB AS TABLE OF FIRST_RECORDTYPE;Here is the query generated at runtime and is inside a LOOP
    --I initialize my Object Type*
    data := new FIRST_RECORDTYPETAB();
    FOR some_cursor IN c_get_ids (username)
    LOOP
    x_context_count := x_context_count + 1;
    -- here I build the query dynamically and the same query generated is
    sql_query := 'SELECT pkid as pid ,pkname as pname,pkcity as pcity, pkcounty as pcounty FROM cities WHERE passed = <this value changes on every iteration of the cursor>'
    -- and now I need to execute the above query but need to store the output
    EXECUTE IMMEDIATE sql_query
    INTO *<I need to save the out put in the Type I defined>*
    END LOOP;
    How can I save the output of the dynamically built query in the Object Type. As I am looping so the type can have several records.
    Any help is appreciated.
    Thanks

    hai ,
    solution for Dynamically built query on execution How to save the data in Object Type.
    Step 1:(Object creation)
    SQL> ED
    Wrote file afiedt.buf
    1 Create Or Replace Type contract_details As Object(
    2 contract_number Varchar2(15),
    3 contrcat_branch Varchar2(15)
    4* );
    SQL> /
    Type created.
    Step 2:(table creation with object)
    SQL> Create Table contract_dtls(Id Number,contract contract_details)
    2 /
    Table created.
    Step 3:(execution Of procedure to insert the dynamic ouput into object types):
    Declare
    LV_V_SQL_QUERY Varchar2(4000);
    LV_N_CURSOR Integer;
    LV_N_EXECUTE_CURSOR Integer;
    LV_V_CONTRACT_BR Varchar2(15) := 'TNW'; -- change the branch name by making this as input parameter for a procedure or function
    OV_V_CONTRACT_NUMBER Varchar2(15);
    LV_V_CONTRACT_BRANCH Varchar2(15);
    Begin
    LV_V_SQL_QUERY := 'SELECT CONTRACT_NUMBER,CONTRACT_BRANCH FROM CC_CONTRACT_MASTER WHERE CONTRACT_BRANCH = '''||LV_V_CONTRACT_BR||'''';
    LV_N_CURSOR := Dbms_Sql.open_Cursor;
    Dbms_Sql.parse(LV_N_CURSOR,LV_V_SQL_QUERY,2);
    Dbms_Sql.define_Column(LV_N_CURSOR,1,OV_V_CONTRACT_NUMBER,15);
    Dbms_Sql.define_Column(LV_N_CURSOR,2,LV_V_CONTRACT_BRANCH,15);
    LV_N_EXECUTE_CURSOR := Dbms_Sql.Execute(LV_N_CURSOR);
    Loop
    Exit When Dbms_Sql.fetch_Rows (LV_N_CURSOR)= 0;
    Dbms_Sql.column_Value(LV_N_CURSOR,1,OV_V_CONTRACT_NUMBER);
    Dbms_Sql.column_Value(LV_N_CURSOR,2,LV_V_CONTRACT_BRANCH);
    Dbms_Output.put_Line('CONTRACT_BRANCH--'||LV_V_CONTRACT_BRANCH);
    Dbms_Output.put_Line('CONTRACT_NUMBER--'||OV_V_CONTRACT_NUMBER);
    INSERT INTO contract_dtls VALUES(1,CONTRACT_DETAILS(OV_V_CONTRACT_NUMBER,LV_V_CONTRACT_BRANCH));
    End Loop;
    Dbms_Sql.close_Cursor (LV_N_CURSOR);
    COMMIT;
    Exception
    When Others Then
    Dbms_Output.put_Line('SQLERRM--'||Sqlerrm);
    Dbms_Output.put_Line('SQLERRM--'||Sqlcode);
    End;
    step 4:check the values are inseted in the object included table
    SELECT * FROM contract_dtls;
    Regards
    C.karukkuvel

  • How to return Values from Oracle Object Type to Java Class Object

    Hello,
    i have created an Oracle Object Types in the Database. Then i created Java classes with "jpub" of these types. Here is an example of the type.
    CREATE OR REPLACE TYPE person_type AS OBJECT
    ID NUMBER,
    vorname VARCHAR2(30),
    nachname VARCHAR2(30),
    geburtstag DATE,
    CONSTRUCTOR FUNCTION person_type RETURN SELF AS RESULT,
    CONSTRUCTOR FUNCTION person_type(p_id NUMBER) RETURN SELF AS RESULT,
    CONSTRUCTOR FUNCTION person_type(p_vorname VARCHAR2,
    p_nachname VARCHAR2,
    p_geburtstag DATE) RETURN SELF AS RESULT,
    MEMBER FUNCTION object_exists(p_id NUMBER) RETURN BOOLEAN,
    MEMBER PROCEDURE load_object(p_id NUMBER),
    MEMBER PROCEDURE save_object,
    MEMBER PROCEDURE insert_object,
    MEMBER PROCEDURE update_object,
    MEMBER PROCEDURE delete_object
    MEMBER PROCEDURE load_object(p_id NUMBER) IS
    BEGIN
    SELECT p.id, p.vorname, p.nachname, p.geburtstag
    INTO SELF.ID, SELF.vorname, self.nachname, SELF.geburtstag
    FROM person p
    WHERE p.id = p_id;
    END;
    My problem is, that if i use the member function "load_object" from my java app it doesnt return the selected values to the java class and i dont know why. I use the java class like this:
    PersonObjectType p = new PersonObjectType();
    p.load_object(4);
    There is a reocrd in the database with id = 4 and the function will execute successful. But if i try to use "p.getVorname()" i always get "NULL". Can someone tell me how to do that?
    Thanks a lot.
    Edited by: NTbc on 13.07.2010 15:36
    Edited by: NTbc on 13.07.2010 15:36

    CallableStatement =
    "DECLARE
    a person_type;
    BEGIN
    a.load_object(4);
    ? := a;
    END;"
    And register as an out parameter.
    Edited by: michael76 on 14.07.2010 05:01

  • How to call a function having OBJECT type as Return type

    Hi,
    I've the following function returning OBJECT type.
    Pease advice me how to call this function
    CREATE OR REPLACE TYPE GET_EMP_OBJ is object
       ( emp_name varchar2(50) ,
         mgr_id   number,
         dept_id  number
    CREATE OR REPLACE FUNCTION get_emp(P_emp_no NUMBER )
      RETURN GET_EMP_OBJ  IS
      t_emp_info GET_EMP_OBJ ;
      v_ename  EMP.ename%TYPE;
      v_mgr    EMP.mgr%TYPE ;
      v_deptno EMP.deptno%TYPE;
      v_ename1  EMP.ename%TYPE;
      v_mgr1    EMP.mgr%TYPE ;
      v_deptno1 EMP.deptno%TYPE;
    BEGIN
      FOR rec IN ( SELECT ename , mgr , deptno
                     FROM emp )
      LOOP
         v_ename := rec.ename ;
         v_ename1 := v_ename1||'|'||v_ename ;
         v_mgr   := rec.mgr   ;
         v_mgr1  := v_mgr1||'|'||v_mgr ;
         v_deptno:= rec.deptno;
         v_deptno1 := v_deptno1||'|'||v_deptno ;
      END LOOP ;
      t_emp_info  := GET_EMP_OBJ (v_ename,v_mgr,v_deptno ) ;
      RETURN t_emp_info ;
    EXCEPTION WHEN OTHERS THEN
      DBMS_OUTPUT.put_line ('Error'||SQLCODE||','||SQLERRM ) ;
    END;The above function got created successfully.
    And i'm confused how to call this functions. I tried like below but didn't work
    DECLARE
      t_emp_info_1  GET_EMP_OBJ ;
    BEGIN
       t_emp_info_1 := get_emp(7566) ;
       for i in 1..t_emp_info_1.COUNT
          LOOP
             DBMS_OUTPUT.put_line ('Values are'||i.emp_name ) ;
         END LOOP;
    END;  

    SQL> CREATE OR REPLACE TYPE GET_EMP_OBJ is object
      2     ( emp_name varchar2(50) ,
      3       mgr_id   number,
      4       dept_id  number
      5     );
      6  /
    Type created.
    SQL> ed
    Wrote file afiedt.buf
      1  CREATE OR REPLACE FUNCTION get_emp(empno NUMBER )
      2    RETURN GET_EMP_OBJ  IS
      3    t_emp_info GET_EMP_OBJ ;
      4  BEGIN
      5    begin
      6      select get_emp_obj(ename, mgr, deptno) into t_emp_info
      7      from emp
      8      where empno = get_emp.empno;
      9    exception
    10      when no_data_found then
    11        t_emp_info := new get_emp_obj(null,null,null);
    12    end;
    13    return t_emp_info;
    14* END;
    SQL> /
    Function created.
    SQL> set serverout on
    SQL>
    SQL> declare
      2    t_emp_info  GET_EMP_OBJ ;
      3  BEGIN
      4     t_emp_info := get_emp(7566);
      5     DBMS_OUTPUT.put_line ('Values are: '||t_emp_info.emp_name||', '||t_emp_info.mgr_id||', '||t_emp_info.dept_id);
      6  END;
      7  /
    Values are: JONES, 7839, 20
    PL/SQL procedure successfully completed.
    SQL>

  • How do i change axis label object type from label to text? (to allow wrapping)

    In the example of a barChart, how does one change the LABEL type from "Label" to "Text"?
    I am trying to allow for long labels to wrap (ie. multi-line labels), but the default object type of labels is "Label" (which are single-line only).
    I have been researching this issue all day, and have enountered a similar situation for changing the Legend component labels where a method override is implemented in a custom itemRenderer.
    But I have not been able to figure out how to do this for an Axis label.
    Any help would be greatly appreciated!  
    J

    Yes, thank you.  I am aware of the AxisRenderer.... but I'm not sure how to implement it to change the label type from "Label" to "Text" to allow for wrapping.
    I guess what I'm looking for is a good example....  

  • MASS - how to add more tables to object types

    I am setting up a variant in the MASS transaction and I need to add the VBUP / order line item status table to the Object Type  BUS2032 - sales orders.   How can I add another table to this?   Currently VBAK, VBKD and VBAP are available.
    Thank you,
    Lisa

    > Hi Lisa,
    > I feel you are tyring out something which cannot be
    > done.
    > MASS will allow you to make a large number of changes
    > at one go by creating a BDC.
    > Now if you cannot do the change manually then you
    > cant do it using MASS.
    >
    > So trying to maintain VBUP thru MASS will not work.
    > You may need to find out the field in VBAP which
    > would trigger the VBUP updation in your scenario.
    >
    > Reward points if this clarifies your question.
    > regards
    > Biju
    Hello Biju,
    MASS is doing what I want it to do.  I can upload a file of sales orders that have not been delivered.  I can then change the line item pricing date using MASS, and that will trigger the Carry Out New Pricing function. 
    I just wanted to add the delivery-status field to the select options screen in MASS.  I don't want to change the delivery-status field value.    I know that BUS2032 is SAP-delivered, but it it possible to copy that object to ZBUS2032 and then add the VBUP table for my selection criteria?
    Thank you,
    Lisa

  • How to Convert OBJECT_TYPE to the Object Type Used for DBMS_METADATA?

    How do you convert the object type in ALL_OBJECTS to the object type that DBMA_METADATA.GET_DDL expects?
    Thanks,
    Kurz

    maybe one needs to find a mapping between sys.metaview$ and all_objects:
    SQL> select type, xmltag, udt, viewname from sys.metaview$ where type like '%PACKAGE%'
    TYPE                      XMLTAG                    UDT                       VIEWNAME                
    DE_S_PACKAGE                                                                                          
    DE_S_COMP_PACKAGE                                                                                     
    DE_S_COMP_PACKAGE2                                                                                    
    DE_S_COMP_PACKAGE_SPEC                                                                                
    DE_S_PACKAGE_BODY1                                                                                    
    DE_S_PACKAGE_BODY                                                                                     
    SE_PACKAGE                                                                                            
    SE_COMP_PACKAGE                                                                                       
    SE_COMP_PACKAGE2                                                                                      
    SE_COMP_PACKAGE_SPEC                                                                                  
    SE_PACKAGE_BODY                                                                                       
    PACKAGE                   PACKAGE_T                 KU$_PROC_T                KU$_PKG_VIEW            
    PACKAGE                   PACKAGE_BODY_T            KU$_PROC_T                KU$_PKGBDY_VIEW         
    PACKAGE                   FULL_PACKAGE_T            KU$_FULL_PKG_T            KU$_FULL_PKG_VIEW       
    PACKAGE_SPEC              PACKAGE_T                 KU$_PROC_T                KU$_PKG_VIEW            
    PACKAGE_BODY              PACKAGE_BODY_T            KU$_EXP_PKG_BODY_T        KU$_EXP_PKG_BODY_VIEW   
    ALTER_PACKAGE_SPEC        ALTER_PACKAGE_SPEC_T      KU$_ALTER_PROC_T          KU$_ALTER_PKGSPC_VIEW   
    ALTER_PACKAGE_BODY        ALTER_PACKAGE_BODY_T      KU$_ALTER_PROC_T          KU$_ALTER_PKGBDY_VIEW   
    18 rows selected.

  • How i will retrive rows from object type

    test is object type(varchar2,varchar2)
    test1 is a object derived from test
    test1(varchar2,varchar2,test);
    how i will retrive rows from test1.
    declare
    type recf is ref cursor;
    v_tab test1 := test1('a','b',test('c','d'));
    rec recf;
    begin
    open rec for
    select * from table(cast(v_tab as test1));
    dbms_output.put_line('the rows are'||rec.test1.test11);
    end;
    when i compile this it return
    ERROR at line 7:
    ORA-06550: line 7, column 35:
    PL/SQL: ORA-22907: invalid CAST to a type that is not a nested table or VARRAY
    ORA-06550: line 7, column 1:
    PL/SQL: SQL Statement ignored
    ORA-06550: line 8, column 48:
    PLS-00487: Invalid reference to variable 'REC'
    ORA-06550: line 8, column 1:
    PL/SQL: Statement ignored
    error.

    hi ur previous example really helping me but please help me in this current senario,
    PROCEDURE reserveNumbers (
         TheNumberRange IN NumberRange,
         UserID IN userid,
         ReturnStatus OUT CallStatus ); which is in P_Numbermgr_Api package.
    here NumberRange is a object
    TYPE NumberRange IS OBJECT (
         StartNumber               VARCHAR2(40),
         EndNumber               VARCHAR2(40),
         NumberAttributes          NumberAttr)
    NumberAttributes field based on NumberAttr object
    TYPE NumberAttr IS OBJECT (
         NumberType          VARCHAR2(15),
         CountryCode          VARCHAR2(10),
         CityCode      VARCHAR2(3))
    i write a package within package i am calling P_Numbermgr_Api.reserveNumbers:
    CREATE or replace TYPE My_numberrange IS TABLE OF numberrange;
    CREATE OR REPLACE PACKAGE numberrange_wrapper AS
    TYPE cursor_type IS REF CURSOR;
    TYPE cursor_type1 IS REF CURSOR;
    TYPE cursor_type2 IS REF CURSOR;
    v_userid number;
    PROCEDURE Getnumberrange (userid IN number,
    p_recordset OUT numberrange_wrapper.cursor_type);
    END numberrange_wrapper;
    within package body i write
    CREATE OR REPLACE PACKAGE body numberrange_wrapper AS
    PROCEDURE Getnumberrange (userid IN number,p_recordset IN OUT numberrange_wrapper.cursor_type)
    is
    v_tab My_numberrange := My_numberrange();
    refc numberrange_wrapper.cursor_type2;
    BEGIN
    numberrange_wrapper.v_userid:= userid;
    OPEN p_recordset FOR
    SELECT
         * FROM
         Table(Cast(v_tab As My_numberrange));
    P_Numbermgr_Api.reserveNumbers (My_numberrange,v_userid,p_recordset);
    END Getnumberrange;
    end numberrange_wrapper;
    it return
    PLS-00330: invalid use of type name or subtype name
    please help me how i will solve this problem

  • How to user jdbc visit oracle object type function?

    1、create oracle object
    create type cocotestparam1 as object
    (id number,
    name varchar(10)
    2、add function to object
    alter type cocotestparam1 add member function test1(t number) return member;
    3、create object body
    create type body cocotestparam1 as
    memeber function test1(t number)
    return number
    is
    begin
    return t;
    end;
    end;
    how can I visit the object cocotestparam1's function?
    and how can I user jdbc visit the function?

    CallableStatement =
    "DECLARE
    a person_type;
    BEGIN
    a.load_object(4);
    ? := a;
    END;"
    And register as an out parameter.
    Edited by: michael76 on 14.07.2010 05:01

  • How to index a varray of object type?

    Hello,
    Is it possible to index a varray/Table type, which is of type of an object, like the way the scalar types are.
    say, CREATE OR REPLACE
    TYPE SAMPLE_TABLE AS TABLE OF Date index by binary_integer
    But if I have to change the table type from Date to an object
    lets say
    create or replace TYPE SAMPLE_TYPE AS OBJECT (
    id NUMBER(12),
    value varchar2(12)
    Will I be able to do
    CREATE OR REPLACE
    TYPE SAMPLE_TABLE AS TABLE OF SAMPLE_TYPE index by id
    If not, is there a way it can be done, or is it a limitaion that it cant be done. Any pointers to this is highly appreciated.
    Thanks

    One way to do this...
    SQL> drop type profile_options_object_array
      2  /
    SQL> drop type profile_options_object
      2  /
    SQL> drop table t
      2  /
    SQL>
    SQL> CREATE OR REPLACE TYPE profile_options_object AS OBJECT(
      2  option_name VARCHAR2(100),
      3  option_value VARCHAR(200)
      4  );
      5  /
    SQL> CREATE OR REPLACE TYPE profile_options_object_array AS VARRAY(32000) OF profile_options_object;
      2  /
    SQL>
    SQL> create table t
      2  (x varchar2(10)
      3  ,y varchar2(10)
      4  );
    SQL> insert into t values ('name1', 'value1');
    SQL> insert into t values ('name2', 'value2');
    SQL> commit;
    SQL>
    SQL> select profile_options_object (x, y)
      2    from t
      3  /
    PROFILE_OPTIONS_OBJECT(X,Y)(OPTION_NAME, OPTION_VALUE)
    PROFILE_OPTIONS_OBJECT('name1', 'value1')
    PROFILE_OPTIONS_OBJECT('name2', 'value2')
    SQL> declare
      2     profile_options  profile_options_object_array;
      3     idx pls_integer;
      4  begin
      5     select profile_options_object (x, y)
      6       bulk collect
      7       into profile_options
      8       from t
      9     ;
    10    idx := profile_options.first;
    11    while idx is not null
    12    loop
    13      dbms_output.put_line (profile_options(idx).option_name); 
    14      dbms_output.put_line (profile_options(idx).option_value);
    15      idx := profile_options.next(idx);
    16    end loop;
    17  end;
    18  /
    name1
    value1
    name2
    value2
    SQL>

  • Object type, how to search in OWB

    Hi,
    We have got a list of object types, which will be affected from a license-change.
    e.g.: XML Files as a target, Operators for pluggable mapping....
    So how do I search for such object-types, to see, if we have such in our OWB-World ?
    thx for any hint.
    kancom

    Try this line instead
    query_type.Value ="*='Account'*";
    instead of
    query_type.Value ="Account";
    Means make it like a search criteria like in SQL,ie., equals followed by single quoted sometext *='sometext'*
    Let me know if that worked....
    Regards,
    Deepak H Andeli

  • Object type and object subtipe in configuration of Z component

    I created one Z component and I need to have different configuration views. If I create configuration I have only <DEFAULT> value available for object type and subtype. How can I define other available object types for Z component?
    Thank you in advance.

    Hi Robert,
    You can go to CRM->UI Framework->UI Framework Definition->Define UI Object Types.
    These are generic Object types and can be used for defining configuration of any component.
    Alternatively, you can create your own Object types and Sub Object types (hardcoded) in the method where you want to use them. You can look into method DO_CONFIG_DETERMINATION in class CL_BP_HEAD_ACCOUNTDETAILS_IMPL for reference.
    Thanks
    Vishal

  • SSIS 2012 - Parent/Child Package "Object" Type Variables

    How do I pass Variables of Object type from Parent to Child packages?
    I am using the SSIS 2012 project deployment model.
    Thanks

    You can do it as outlined in
    http://sqlblog.com/blogs/andy_leonard/archive/2010/01/25/ssis-snack-passing-parent-starttime-to-the-child-package.aspx
    But
    When you need an object it is typically a recordset, then just pass the results, or execute the query in a package.
    Arthur My Blog

  • Workflow - Create a new buisness object type for an new infotype.

    Hi all,
    I have an issue with creating a new buisness object type, which is related to a
    supertype, for an new infotype.
    I am new to workflow and business object. I don't have much knowledge in these area. I need to resolve this problem ASAP.
    Could someone please provide me a step-by-step guide on how to create a new business object type, which is related to an existing supertype, for an newly created infotype?
    If would be very much appreciated if someone could assist me in resolving this issue.
    Thank You.

    Business objects are maintained in SWO1 creating a subtype is done with the button: Create subtype (F9)
    If you don't have knowledge of workflow or abap objects, it is perhaps better to tell your employer that and find someone who has.
    If your problem is simply only creating a subtype then go with the instructions I already gave you, if however more things need to be done, like extending the subtype with (virtual)attributes, methods, events, delegating the subtype and implementing the methods in newly created tasks and subsequently workflows I really advise to find someone who can do this, or attend a SAP course on this subject.
    Kind regards, Rob Dielemans

  • E-Recruiting : Urgent!!! International assignment ;object type CP

    Dear Experts,
    1)Can someone please properly explain the concept of International assignment? How is this related to the object type CP from object P?
    2)Secondly, when running the report HRALXSYNC to transfer the employees from PA to eRecruiting tables, is there anything in specific that we need to take care with respect to international assignments? If there are 2 pernrs existing for an employee,which record will be transferred to the eRecruiting tables?
    (we have an integrated implementation scenario with ERec 603 in the same system as ECC 6.0)
    3)Is there any other way of creating users for employees enmasse in an integrated scenario implementation apart from the execution of report HRALXSYNC?
    Thanks in advance!
    Best regards,
    Sowmya

    Refer to the link to understand the scenario of candidate and Person.
    http://help.sap.com/erp2005_ehp_03/helpdata/EN/72/c9b54015c4752ae10000000a155106/frameset.htm
    The purpose of each is that
    When hralxsync is run for a given person a user is created EE(pernrno) is the user id. for this user we have a BP created which stores the address and personal data of the employee.
    BP is the transaction to see the details.
    And an NA candidate is created you can see this in table HRP5102.
    CP links all of them.
    you can see this relationship from hrp1001.
    If there are different pernr then their personal and address data is the same there fore CP will link to multiple pernr and there will be one BP.
    I am not sure about NA and User that you will have to try it on the server.
    Regards,
    Divya

Maybe you are looking for