Object related
hi all...
I have written extended class. In that super class has 3 methods and subclass has 4 methods. I want to make sub class object(excluding superclass methods) only serializable. How can i do this...
Regards
mahesh3018 wrote:
hi all...
I have written extended class. In that super class has 3 methods and subclass has 4 methods. I want to make sub class object(excluding superclass methods) only serializable. How can i do this...
RegardsPolymorphism demands that if the super class has 3 non-private methods, and the subclass has 4 non-private methods, that a client will be able to call all 7 methods when given a reference to an instance of the subclass. Serialization won't affect that.
I agree with the poster who thought there was confusion about methods and members. "transient" is the key here.
%
Similar Messages
-
Objects related to SD for excise invoice number range
Dear gurus,
Kindly provide the objects related to excise invoice number range for SD module to be updated for new financial year.
[ for ex. j_1excloc ]
Regards
R.Rajendranprovide the objects related to excise invoice number range for SD
Following objects should be maintained in SNUM
J_1IARE1:::::::ARE1 Doc No object based on Series Group
J_1IARE3:::::::ARE3 Doc No object based on Series Group
J_1IDEPINV:::::Excise Invoice Number for Depot Invoices
J_1IEXCEXP:::::Export excise invoice number range
J_1IEXCINV:::::Excise invoice number
J_1IEXCLOC:::::Local excise invoice numebr range
J_1IEXINEX:::::Excise invoice number for export
J_1IINTPR2:::::Despatch serial number
thanks
G. Lakshmipathi -
Printing out results in case of object-relational table (Oracle)
I have made a table with this structure:
CREATE OR REPLACE TYPE Boat AS OBJECT(
Name varchar2(30),
Ident number,
CREATE OR REPLACE TYPE Type_boats AS TABLE OF Boat;
CREATE TABLE HOUSE(
Name varchar2(40),
MB Type_boats)
NESTED TABLE MB store as P_Boat;
INSERT INTO House VALUES ('Name',Type_boats(Boat('Boat1', 1)));
I am using java to print out all the results by calling a procedure.
CREATE OR REPLACE package House_boats
PROCEDURE add(everything works here)
PROCEDURE results_view;
END House_boats;
CREATE OR REPLACE Package.body House_boats AS
PROCEDURE add(everything works here) AS LANGUAGE JAVA
Name House_boats.add(...)
PROCEDURE results_view AS LANGUAGE JAVA
Name House_boats.resuts_view();
END House_boats;
However, I am not able to get Results.view working in case of object-relation table. This is how I do it in the situation of relational table.
CALL House_boats.results_view();
House_boats.java file which is loaded using LOADJAVA:
import java.sql.*;
import java io.*;
public class House_boats {
public static void results_view ()
throws SQLException
{ String sql =
"SELECT * from House";
try { Connection conn = DriverManager.getConnection
("jdbc:default:connection:");
PreparedStatement pstmt = conn.prepareStatement(sql);
ResultSet rset = pstmt.executeQuery();
printResults(rset);
rset.close();
pstmt.close();
catch (SQLException e) {System.err.println(e.getMessage());
static void printResults (ResultSet rset)
throws SQLException { String buffer = "";
try { ResultSetMetaData meta = rset.getMetaData();
int cols = meta.getColumnCount(), rows = 0;
for (int i = 1; i <= cols; i++)
int size = meta.getPrecision(i);
String label = meta.getColumnLabel(i);
if (label.length() > size) size = label.length();
while (label.length() < size) label += " ";
buffer = buffer + label + " "; }
buffer = buffer + "\n";
while (rset.next()) {
rows++;
for (int i = 1; i <= cols; i++) {
int size = meta.getPrecision(i);
String label = meta.getColumnLabel(i);
String value = rset.getString(i);
if (label.length() > size) size = label.length();
while (value.length() < size) value += " ";
buffer = buffer + value + " "; }
buffer = buffer + "\n"; }
if (rows == 0) buffer = "No data found!\n";
System.out.println(buffer); }
catch (SQLException e) {System.err.println(e.getMessage());} }
How do I print out the results correctly in my case of situation?
Thank you in advanceI have made a table with this structure:
I am using java to print out all the results by calling a procedure.
However, I am not able to get Results.view working in case of object-relation table. This is how I do it in the situation of relational table.
How do I print out the results correctly in my case of situation?
There are several things wrong with your code and methodology
1. The code you posted won't even compile because there are several syntax issues.
2. You are trying to use/test Java in the database BEFORE you get the code working outside the DB
3. Your code is not using collections in JDBC properly
I suggest that you use a different, proven approach to developing Java code for use in the DB
1. Use SIMPLE examples and then build on them. In this case that means don't add collections to the example until ALL other aspects of the app work properly.
2. Create and test the Java code OUTSIDE of the database. It is MUCH easier to work outside the database and there are many more tools to help you (e.g. NetBeans, debuggers, DBMS_OUTPUT windows, etc). Trying to debug Java code after you have already loaded it into the DB is too difficult. I'm not aware of anyone, even at the expert level, that develops that way.
3. When using complex functionality like collections first read the Oracle documentation (JDBC Developer Guide and Java Developer's Guide). Those docs have examples that are known to work.
http://docs.oracle.com/cd/B28359_01/java.111/b31225/chfive.htm
http://docs.oracle.com/cd/E11882_01/java.112/e16548/oraarr.htm#sthref583
The main issue with your example is #3 above; you are not using collections properly:
String value = rset.getString(i);
A collection is NOT a string so why would you expect that to work for a nested table?
A collection needs to be treated like a collection. You can even treat the collection as a separate result set. Create your code outside the database and use the debugger in NetBeans (or other) on this replacement code for your 'printResults' method:
static void printResults (ResultSet rset) throws SQLException {
try {
ResultSetMetaData meta = rset.getMetaData();
while (rset.next()) {
ResultSet rs = rset.getArray(2).getResultSet();
rs.next();
String ndx = rs.getString(1);
Struct struct = (Struct) rs.getObject(2);
System.out.println(struct.getSQLTypeName());
Object [] oa = struct.getAttributes();
for (int j = 0; j < oa.length; j++) {
System.out.println(oa[j]);
} catch (SQLException e) {
System.err.println(e.getMessage());
That code ONLY deals with column 2 which is the nested table. It gets that collection as a new resultset ('rs'). Then it gets the contents of that nested table as an array of objects and prints out the attributes of those objects so you can see them.
Step through the above code in a debugger so you can SEE what is happening. NetBeans also lets you enter expressions such as 'rs' in an evaluation window so you can dynamically try the different methods to see what they do for you.
Until you get you code working outside the database don't even bother trying to load it into the DB and create a Java stored procedure.
Since your current issue has nothing to do with this forum I suggest that you mark this thread ANSWERED and repost it in the JDBC forum if you need further help with this issue.
https://forums.oracle.com/community/developer/english/java/database_connectivity
When you repost you can include a link to this current thread if you want. Once your Java code is actually working then try the Java Stored procedure examples in the Java Developer's Guide doc linked above.
At the point you have any issues that relate to Java stored procedures then you should post them in the SQL and PL/SQL forum
https://forums.oracle.com/community/developer/english/oracle_database/sql_and_pl_sql -
Yes, I want to create object-relational schema from DTD.
Thank you for reply~~
I want to create object-relational schema from DTD using object type or collections as mentioned.
In reply, it is impossible.
But, I read Oracle supports storing an XML document with object-relation. I executed storing sample, but I had to create schema manually.
Is it really impossible to create OR schema from DTD automatically?Yes. You need to create your database schema before insert XML data to it.
-
Need help in Object-Relational Mapping
I'm writing a simple two-tiered business application with Swing application on the client side and a DBMS on the server side. To make my client code more maintainable, I decided to create Business Objects instead of having my client accessing the database directly via SQL. For simplicity, I'm not using any features from the J2EE framework, and the Business Objects will be hosted on the client side, with one-to-one mapping to tables in the database. Since this is my first attempt in Object-Relational Mapping, I'm faced with the following problems:
1. What kind of methods are appropriate for business objects? For example, if I have a Machine and Employee entity. A Machine is owned by an employee, and this is represented in the DB by storing the employee ID (not the name) as a foreign key in the Machine table. Let's say in the user interface I have a table that needs to display the list of Machines, but instead of displaying the owner employee's ID, I want to display the owner employee's name by doing a join select. Should the findMachines() method always perform a join select to get owner's name and store it in the Machine object which is returned, or should findMachines() simply return the owner's ID so the UI will need to make another SQL call (through the Employee object) to get the employee's name? The latter is more elegant, but would it be horribly inefficient if there are lots of machines to be displayed (and for each machine we make a separate select call to get the owner's name).Business objects should be separate from how they're persisted.
When you say object-relational mapping, do you mean a tool like Hibernate? Or are you writing your own persistence layer using JDBC and SQL?
I'd recommend that you read about the Data Access Object pattern and keep the persistence code out of the business objects themselves:
http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html
url=http://www-106.ibm.com/developerworks/java/library/j-dao/ -
Authorization Object Related To Movement Type
Hi,
I meet one problem, one user want to check which user can use MB1A t-code with movement type 201 and 202, but I know there are some authorization object related to movement type and I want to use suim with mb1a t-code and authorization object to check the user, but I don't know the authorization object about movement type in MB1A t-code, does anyone can help?Go to SU24, enter the transaction code and press execute.
Here you can see the all authorization object whose are used for the transaction code MB1C.
Regards
Dev -
XPath query works with CLOB but not with object relational
hi all
i have the following queries,the XQuery work with all, but XPath queries work with XMLType CLOB and Binary XML, but they do not work with XMLType as Object relational,
select extract (object_value,'movies/directorfilms/films/film [studios/studio = "Gaumont"]')
from xorm;
select extract (object_value,'movies/directorfilms[director/dirname = "L.Cohen"]/films/film[position()=2]/t')
from xorm;
they shows this message
ORA-00932: inconsistent datatypes: expectd SYSTEM.name683_COLL got CHAR
thanksHi Marco
fisrt here is my RO
BEGIN
DBMS_XMLSCHEMA.registerSchema(
SCHEMAURL=>'http://......../ORMovies.xsd',
SCHEMADOC=>bfilename('DB','Movies.xsd'),
LOCAL =>false,
GENTYPES=>true,
GENTABLES=>FALSE,
CSID=>nls_charset_id('AL32UTF8'));
END;
create table XORM of xmltype
xmltype store as object relational
XMLSCHEMA "http://......../ORMovies.xsd"
ELEMENT "movies";
INSERT INTO XORM
VALUES(XMLType(BFILENAME('DB','ORMovies.xml'),nls_charset_id('AL32UTF8')));
here the XQuery format that work fine with the OR
A/D
select XMLQuery ('for $a in movies/directorfilms/films/film
where $a/studios/studio = "Gaumont"
return $a'
passing object_value
returning CONTENT)"TitleX"
from xorm;
child element query
select XMLQuery ('for $a in movies/directorfilms/director[dirname = "Feyder"]
let $b:=$a/../films/film[position()=2]
return $b/t'
passing object_value
returning CONTENT)"TitleX"
from xorm;
here is the XPath format which doesn't work
select extract (object_value,'movies/directorfilms/films/film [studios/studio = "Gaumont"]')
from xorm;
select extract (object_value,'movies/directorfilms[director/dirname = "Feyder"]/films/film[position()=2]/t')
from xorm;
by the way all queries work fine with the CLOB or Binary XML
many thanx Marco -
XML stored as object relational fails
We are looking at implementing a system to store Universal Business Language (UBL) 1.0 XML invoices in an XMLType column in 10g. I've registered all the requisite schemas (the UBL invoice comprises a rather complicated hierarchy of 19 individual namespaces), but when I come to create the table:
CREATE TABLE UBLInvoices (
invoice_id NUMBER,
invoice_spec XMLTYPE)
XMLTYPE invoice_spec STORE AS OBJECT RELATIONAL
XMLSCHEMA "Invoice-1.0"
ELEMENT "Invoice";
I get an error message to the effect that a table with more than 1000 columns cannot be created. I can create the table using CLOB storage (STORE AS CLOB) without any problems. Is there a limit to the complexity of typed XMLType column schema? Is there any workaround?As A Non says, why is it unacceptable?
It's only unacceptable to you, but it's not unacceptable XML. The standard of XML does not require a display format as the purpose of XML is to define a structure of data, not to present itself nicely to you on the screen.
If you want to prettify your XML, that's up to you, but optimised XML data does not have formatting, which takes up additional and unnecessary storage space. -
Bug: Front Panel objects relative position change when placing merge VI onto Block Diagram
I've posted a bug report on LAVA, here:
http://forums.lavag.org/Front-Panel-objects-relative-position-change-when-placing-merge-VI-onto-Bloc...
If someone at NI can reproduce, can I please get a CAR #?
Thanks,
-Jim
Solved!
Go to Solution.Donovan B wrote:
Hi Jim,
After my previous post, I also saw this behavior, so I decided to do another test. If there are no decorations in the VI set to “Merge VI” (“Place VI Contents” for LabVIEW 8.5 and later) the controls and indicators are still not selected when dropping the VI from the Functions palette. I checked this behavior back to LabVIEW 7.1 and it is consistent throughout that controls and indicators are not selected. (Consequently, so is the fact that when decorations are present they don’t maintain the relative position).
I am not sure if this would be better suited as a CAR or product suggestion since it has been this way that long, but it does not appear to be related to the fact that decorations are present in the Merge VI. It does seem strange that the decorations are selected though. Looks like the best way to work around this is to drop the VI from the Controls palette. Hopefully, it’s not too much of a hassle.
Hi Donovan,
Thanks for checking in.
> I checked this behavior back to LabVIEW 7.1 and it
is consistent throughout that controls and indicators are not
selected. (Consequently, so is the fact that when decorations are
present they don’t maintain the relative position).
This just means that not many people use this feature. However, now that VIPM Professional makes it so easy to edit the palettes, I'm sure that others will start complaining that this doesn't work as they expect.
> I am not sure if this would be better suited as a CAR or product suggestion
since it has been this way that long, but it does not appear to be
related to the fact that decorations are present in the Merge VI.
Just look up the functional specifications for this feature and see if all objects are supposed to be selected.
But seriously, is there a reason that only the FP decorations are selected? Surely this would be documented somewhere, if there was a good reason for this current (IMO, buggy) behavior.
> It
does seem strange that the decorations are selected though. Looks like
the best way to work around this is to drop the VI from the Controls
palette. Hopefully, it’s not too much of a hassle.
That's not a reasonably work-around, IMO. It doesn't make sense to drop Block Diagram components onto the Front Panel. For example, this bug affects the JKI State Machine. It doesn't make sense to drop a State Machine onto the Front Panel.
So, I'd file it as a CAR/bug, and then wait to see how LV R&D feels about it. If they can find some valid reason for why Controls and Indicators shouldn't be selected, then that's fine (and hopefully someone will explain it to me).
Thanks,
-Jim -
Query on object-relational data takes forever
hello all
i have a problem with a query performance... it seems like whenever i call a specific object function, the query executes very very slow. The results though are correct.
let me explain what i do... I have some relational tables, and i recreate the schema into an object relational one. Then i insert data from relational tables to object tables. I follow this tutorial: [A Sample Application Using Object-Relational Features|http://download.oracle.com/docs/cd/B12037_01/appdev.101/b10799/adobjxmp.htm]
these are the types that make up the transaction object table.
CREATE OR REPLACE TYPE TransactionItem_objtyp AS OBJECT
transItemID NUMBER,
Quantity NUMBER,
iValue NUMBER,
item_ref REF Item_objtyp
CREATE TYPE TransactionItemList_ntabtyp AS TABLE OF TransactionItem_objtyp;
CREATE OR REPLACE TYPE Transaction_objtyp AS OBJECT
transID NUMBER,
cust_ref REF Customer_objtyp,
transTameio NUMBER,
transDateTime DATE,
isStoreCustomer CHAR(1),
store_ref REF Store_objtyp,
transItemList_ntab TransactionItemList_ntabtyp,
MAP MEMBER FUNCTION
getTransID RETURN NUMBER,
MEMBER FUNCTION
getTotalCost RETURN NUMBER
);the function that causes the query to run very slow (fetching 10 rows per sec in a query that should return 130.000 rows) is the getTotalCost:
CREATE OR REPLACE TYPE BODY Transaction_objtyp AS
MAP MEMBER FUNCTION getTransID RETURN NUMBER IS
BEGIN
RETURN transID;
END;
MEMBER FUNCTION getTotalCost RETURN NUMBER IS
i INTEGER;
Total NUMBER := 0;
BEGIN
IF(UTL_COLL.IS_LOCATOR(transItemList_ntab))
THEN
SELECT SUM(L.Quantity * L.iValue) INTO Total
FROM TABLE(CAST(transItemList_ntab AS TransactionItemList_ntabtyp)) L;
ELSE
FOR i IN 1..SELF.transItemList_ntab.COUNT LOOP
Total := Total + SELF.transItemList_ntab(i).Quantity * SELF.transItemList_ntab(i).iValue;
END LOOP;
END IF;
RETURN ROUND(Total,2);
END;
END;the table transaction_objtab that contains the nested table is this
CREATE TABLE Transaction_objtab OF Transaction_objtyp(
PRIMARY KEY(transID),
FOREIGN KEY(cust_ref) REFERENCING Customer_objtab,
FOREIGN KEY(store_ref) REFERENCING Store_objtab)
OBJECT IDENTIFIER IS PRIMARY KEY
NESTED TABLE transItemList_ntab STORE AS TransItem_ntab (
(PRIMARY KEY(transItemID))
ORGANIZATION INDEX)
RETURN AS LOCATOR
ALTER TABLE TransItem_ntab ADD (SCOPE FOR (item_ref) IS Item_objtab);and this is how i insert the values into the transaction_objtab and the nested tables from the relational ones:
INSERT INTO Transaction_objtab
SELECT t.transID,
REF(c),
t.transTameio,
t.transDateTime,
t.isStoreCustomer,
REF(s),
TransactionItemList_ntabtyp()
FROM transactions t, Customer_objtab c, store_objtab s
WHERE t.transCustomer = c.custCode AND t.transStore = s.storeCode;
BEGIN
FOR i IN (SELECT DISTINCT transID FROM transactionItems) LOOP
INSERT INTO TABLE( SELECT p.TransItemList_ntab
FROM Transaction_objtab p
WHERE p.transID = i.transID)
SELECT transItemIDseq.nextval, t.Quantity, t.iValue, REF(i)
FROM transactionItems t, item_objtab i
WHERE t.transID = i.transID AND t.itemID = i.itemID;
END LOOP;
END;so whenever i use transaction_objtab t, t.getTotalCount() query takes for ever.
is there anything i do wrong?
sorry for this long post.
thanks in advanceSo, how many transactions? How many items? There is a whole series of questions I would normally ask at this point, because performance tuning is - to a certain extent - largely a matter of rote. But there's a more fundamental issue.
You are experiencing the problem with objects. They are cool enough when handling individual "things" but they suck when it comes to set-based processing. SQL and relational programming, on the other hand, excels at that sort of thing. So the question which has to asked is, why are you using objects for this project?
Cheers, APC
blog: http://radiofreetooting.blogspot.com -
Need help with creating B*Tree XMLIndex on a structured object-relational xmltype column
The following is my schema:
CREATE TABLE TST_AUDIT_TBL
NOTE VARCHAR2(25 CHAR) null,
CHANGE_HISTORY XMLTYPE not null,
CHANGE_HISTORY_EXT XMLTYPE null
XMLTYPE COLUMN CHANGE_HISTORY STORE AS OBJECT RELATIONAL XMLSCHEMA "http://www.oracle.com/a.xsd" element "A"
XMLTYPE COLUMN CHANGE_HISTORY_EXT STORE AS CLOB XMLSCHEMA "http://www.oracle.com/a.xsd" element "AX"
XML Schema for the above is defined as follows:
<schema targetNamespace="http://www.oracle.com/a.xsd"
xmlns:a="http://www.oracle.com/a.xsd"
xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<complexType name="AuditExtType">
<sequence>
<element name="C" maxOccurs="unbounded" minOccurs="0">
<complexType>
<sequence>
<element type="string" name="CN"/>
<element type="string" name="OV" minOccurs="0" maxOccurs="1"/>
<element type="string" name="NV" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
<complexType name="AuditType">
<sequence>
<element type="string" name="M" maxOccurs="1" minOccurs="0"/>
<element type="string" name="O"/>
<element name="B" maxOccurs="1" minOccurs="0">
<complexType>
<sequence>
<element name="BC" minOccurs="1" maxOccurs="unbounded">
<complexType>
<sequence>
<element type="string" name="BN"/>
<element name="F" maxOccurs="unbounded" minOccurs="0">
<complexType>
<sequence>
<element type="string" name="FN"/>
<element type="string" name="OV" minOccurs="0" maxOccurs="1"/>
<element type="string" name="NV" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
</element>
<element name="T" maxOccurs="1" minOccurs="0">
<complexType>
<sequence>
<element name="TL" minOccurs="1" maxOccurs="unbounded">
<complexType>
<sequence>
<element type="string" name="TN"/>
<element name="C" maxOccurs="unbounded" minOccurs="0">
<complexType>
<sequence>
<element type="string" name="CN"/>
<element type="string" name="OV" minOccurs="0" maxOccurs="1"/>
<element type="string" name="NV" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
</element>
<element name="I" maxOccurs="1" minOccurs="0">
<complexType>
<sequence>
<element name="K" maxOccurs="unbounded" minOccurs="0">
<complexType>
<sequence>
<element type="string" name="N"/>
<element type="string" name="V"/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
<element name="A" type="a:AuditType"/>
<element name="AX" type="a:AuditExtType"/>
</schema>
I want to create a B*Tree XML Index on the above table for the following:
1. CN
2. TN
in the above schema.
Following the doc, this is what I am issuing:
SQL> CREATE INDEX audt_audit_idx1 ON TST_AUDIT_TBL(CHANGE_HISTORY) INDEXTYPE IS XDB.XMLINDEX PARAMETERS ('XMLTABLE IXTAB
2 XMLNAMESPACES(DEFAULT ''http://www.oracle.com/a.xsd''), ''/A'' COLUMNS COLUMN_NAME VARCHAR2(128) PATH ''A/T/TL/C/CN'' ');
CREATE INDEX audt_audit_idx1 ON TST_AUDIT_TBL(CHANGE_HISTORY) INDEXTYPE IS XDB.XMLINDEX PARAMETERS ('XMLTABLE IXTAB
ERROR at line 1:
ORA-29958: fatal error occurred in the execution of ODCIINDEXCREATE routine
ORA-19276: XPST0005 - XPath step specifies an invalid element/attribute name:
(A)
Not sure what is going wrong (and what would be a working xmlindex will look like?)Here goes...
1) Schema registration
begin
dbms_xmlschema.registerSchema(
schemaURL => 'http://www.oracle.com/a.xsd'
, local => true
, genTypes => true
, genTables => false
, enableHierarchy => dbms_xmlschema.ENABLE_HIERARCHY_NONE
, schemaDoc =>
'<schema targetNamespace="http://www.oracle.com/a.xsd"
xmlns:a="http://www.oracle.com/a.xsd"
xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<complexType name="AuditExtType">
<sequence>
<element name="C" maxOccurs="unbounded" minOccurs="0">
<complexType>
<sequence>
<element type="string" name="CN"/>
<element type="string" name="OV" minOccurs="0" maxOccurs="1"/>
<element type="string" name="NV" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
<complexType name="AuditType">
<sequence>
<element type="string" name="M" maxOccurs="1" minOccurs="0"/>
<element type="string" name="O"/>
<element name="B" maxOccurs="1" minOccurs="0">
<complexType>
<sequence>
<element name="BC" minOccurs="1" maxOccurs="unbounded">
<complexType>
<sequence>
<element type="string" name="BN"/>
<element name="F" maxOccurs="unbounded" minOccurs="0">
<complexType>
<sequence>
<element type="string" name="FN"/>
<element type="string" name="OV" minOccurs="0" maxOccurs="1"/>
<element type="string" name="NV" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
</element>
<element name="T" maxOccurs="1" minOccurs="0">
<complexType>
<sequence>
<element name="TL" minOccurs="1" maxOccurs="unbounded">
<complexType>
<sequence>
<element type="string" name="TN"/>
<element name="C" maxOccurs="unbounded" minOccurs="0">
<complexType>
<sequence>
<element type="string" name="CN"/>
<element type="string" name="OV" minOccurs="0" maxOccurs="1"/>
<element type="string" name="NV" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
</element>
<element name="I" maxOccurs="1" minOccurs="0">
<complexType>
<sequence>
<element name="K" maxOccurs="unbounded" minOccurs="0">
<complexType>
<sequence>
<element type="string" name="N"/>
<element type="string" name="V"/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
<element name="A" type="a:AuditType"/>
<element name="AX" type="a:AuditExtType"/>
</schema>'
end;
2) Table creation
CREATE TABLE TST_AUDIT_TBL
NOTE VARCHAR2(25 CHAR) null,
CHANGE_HISTORY XMLTYPE not null,
CHANGE_HISTORY_EXT XMLTYPE null
XMLTYPE COLUMN CHANGE_HISTORY STORE AS OBJECT RELATIONAL XMLSCHEMA "http://www.oracle.com/a.xsd" element "A"
XMLTYPE COLUMN CHANGE_HISTORY_EXT STORE AS CLOB XMLSCHEMA "http://www.oracle.com/a.xsd" element "AX"
3) Retrieving the nested table and column related to the target element :
SQL> select dbms_xmlstorage_manage.xpath2TabColMapping(
2 owner_name => 'DEV'
3 , table_name => 'TST_AUDIT_TBL'
4 , column_name => 'CHANGE_HISTORY'
5 , xpath => '/A/T/TL/C/CN'
6 , namespaces =>'default ''http://www.oracle.com/a.xsd'''
7 )
8 from dual;
DBMS_XMLSTORAGE_MANAGE.XPATH2T
<Result>
<Mapping TableName="SYS_NTr0U7dPWyRu6OVvDN2f5HEg==" ColumnName="CN"/>
</Result>
4) Creating the index :
SQL> create index CHANGE_HISTORY_IX1 on "SYS_NTr0U7dPWyRu6OVvDN2f5HEg==" ("CN");
Index created
If you're going to create multiple indexes like this, you could really benefit from renaming all the nested tables to meaningful names. That can be done via DBMS_XMLSTORAGE_MANAGE as well. -
Hi Gurus,
Can any ony explain how to create the object related messages using add_message method of cl_bsp_wd_message_service?
Thanks,
Murali.Hi Murali,
Check the below code .. hope it helps..
DATA lr_msg_service TYPE REF TO cl_bsp_wd_message_service.
DATA lr_exception TYPE REF TO cx_root.
DATA lr_rtti TYPE REF TO cl_abap_objectdescr.
DATA lv_msg_type TYPE symsgty.
DATA lv_msg_id TYPE symsgid.
DATA lv_msg_number TYPE symsgno.
DATA lv_msg_v1 TYPE symsgv.
DATA lv_msg_v2 TYPE symsgv.
DATA lv_msg_v3 TYPE symsgv.
DATA lv_msg_v4 TYPE symsgv.
DATA lv_msg_level TYPE bsp_wd_message_level.
DATA lr_verification TYPE REF TO if_bsp_wd_message_handler."#EC NEEDED
DATA lv_important_info TYPE abap_bool.
DATA lv_exc_prog_name TYPE syrepid.
DATA lv_exc_incl_name TYPE syrepid.
DATA lv_exc_src_line TYPE i.
lr_exception = ir_exception.
drill down to first exception
WHILE lr_exception->previous IS BOUND.
lr_exception = lr_exception->previous.
ENDWHILE.
lr_rtti ?= cl_abap_typedescr=>describe_by_object_ref( p_object_ref = lr_exception ).
lr_exception->get_source_position( IMPORTING program_name = lv_exc_prog_name
include_name = lv_exc_incl_name
source_line = lv_exc_src_line ).
prepare message
lr_msg_service = cl_bsp_wd_message_service=>get_instance( ).
lv_msg_type = if_genil_message_container=>mt_warning.
lv_msg_id = 'CRM_IC_APPL'.
lv_msg_number = '003'.
lv_msg_v1 = lr_rtti->get_relative_name( ).
lv_msg_v2 = ir_exception->get_text( ).
lv_msg_v3 = lv_exc_incl_name.
lv_msg_v4 = lv_exc_src_line.
lv_msg_level = '9'.
add message to error log
lr_msg_service->add_message(
iv_msg_type = lv_msg_type
iv_msg_id = lv_msg_id
iv_msg_number = lv_msg_number
iv_msg_v1 = lv_msg_v1
iv_msg_v2 = lv_msg_v2
iv_msg_v3 = lv_msg_v3
iv_msg_v4 = lv_msg_v4
iv_msg_level = lv_msg_level
iv_verification = lr_verification
iv_important_info = lv_important_info ).
Regards,
Raghu -
Object services for Object relational Mapping
Hello everyone,
The Object Services of ABAP Objects can create the corresponding Object Model from existing database tables. Is it either capable to carry out an Object relational mapping, just like Hibernate does forJava.
Thanks a lot.?
-
Need clarification - Object Relational Mapping
Folks
I have searched internet , but I could find a simple answer .
I am preparing for my Interview. I just want to reply for this question in a very simple answer
if the employer asked me what is Object Relational Mapping and Explain Cascade and the possible values .
The above question in the context of " Hibernate " .
I am not sure if this is the correct forum category I am asking , please guide me .
Thanks
MattThe best simple answer is to say "I have no idea about those terms but I am eager to learn".
There is no simple answer that will give the impression you know about such stuff when you
don't, that will not expose you immediately to great embarrassment if they pose the simplest
followup question. -
Interface for all cost object related transtions with third party system
Hello Guru's
I have one required for Functional Specications i.e, i need to create interface for all cost object related transtions with third party system for this purpose i need to create FS. any body please guide how to do..Hi sreedhar royals
You need to check controlling tables you need to interact. (CSKS, COAS,....) then ask your abaper and project manager to guide you.
Regards -
ANN: Eclipse EJB 3.0 Object-Relational Mapping Project Requirements posted
A document that presents an intitial feature and use case list for the early milestones of the Eclipse EJB 3.0 Object/Relational Mapping project has been posted to the project newsgroup (news://news.eclipse.org/eclipse.technology.ejb-orm). It also demonstrates a set of user interface components for editing EJB 3.0 Entities. The document covers the basics and is designed to illustrate the concept. It is in no way comprehensive. For example, it doesn't thoroughly cover the editing of ORM xml descriptors although this is an important requirement for the project. ORM xml support will be detailed in coming revisions, and slated for future milestones.
The purpose of this document is to invite comment on the approach. If you are interested in EJB 3.0 Entity support in Eclipse please give the doc a look over and post your feedback to the EJB 3.0 Object-Relational Mapping Project newsgroup.
Newsgroup: news://news.eclipse.org/eclipse.technology.ejb-orm
Simple Web Interface http://www.eclipse.org/newsportal/thread.php?group=eclipse.technology.ejb-orm
--Shaun Smith
Project Overview:
The goal of this project is to add comprehensive support to the Eclipse Project for the definition and editing of Object-Relational (O/R) mappings for EJB 3.0 Entity Beans. EJB 3.0 O/R mapping support will focus on minimizing the complexity of mapping by providing creation and automated initial mapping wizards, and programming assistance such as dynamic problem identification. The implementation will be extensible so third party vendors can add to its functionality.
Project Proposal:
http://www.eclipse.org/proposals/eclipse-ejb30-orm/index.htmlA document that presents an intitial feature and use case list for the early milestones of the Eclipse EJB 3.0 Object/Relational Mapping project has been posted to the project newsgroup (news://news.eclipse.org/eclipse.technology.ejb-orm). It also demonstrates a set of user interface components for editing EJB 3.0 Entities. The document covers the basics and is designed to illustrate the concept. It is in no way comprehensive. For example, it doesn't thoroughly cover the editing of ORM xml descriptors although this is an important requirement for the project. ORM xml support will be detailed in coming revisions, and slated for future milestones.
The purpose of this document is to invite comment on the approach. If you are interested in EJB 3.0 Entity support in Eclipse please give the doc a look over and post your feedback to the EJB 3.0 Object-Relational Mapping Project newsgroup.
Newsgroup: news://news.eclipse.org/eclipse.technology.ejb-orm
Simple Web Interface http://www.eclipse.org/newsportal/thread.php?group=eclipse.technology.ejb-orm
--Shaun Smith
Project Overview:
The goal of this project is to add comprehensive support to the Eclipse Project for the definition and editing of Object-Relational (O/R) mappings for EJB 3.0 Entity Beans. EJB 3.0 O/R mapping support will focus on minimizing the complexity of mapping by providing creation and automated initial mapping wizards, and programming assistance such as dynamic problem identification. The implementation will be extensible so third party vendors can add to its functionality.
Project Proposal:
http://www.eclipse.org/proposals/eclipse-ejb30-orm/index.html
Maybe you are looking for
-
Question:- I created an Apple ID using my ISP Email when I registered at the Store/Apple Support Communities/iTunes/Face Time or other portal and it does not work in iChat. Why Not ? Answer:- For a Name to work in iChat it has to be an Valid AIM scre
-
Issue with 0HRPOSITION_ATTR extractor
We are live with BW HR application and having issue with 0HRPOSITION master data. We are extracting data from SAP using 0HRPOSITION_ATTR datasource. I noticed that data is not maintained correctly in master data tables in BW and giving us incorrect r
-
Line break in pl/sql block
Here's my code, which indeed, may be cumbersome, but works: declare v_id NUMBER; v_iso VARCHAR2(30); v_title VARCHAR2(60); v_approval_req VARCHAR2(10); v_approved VARCHAR2(10); v_job_desc VARCHAR2(60); v_user VARCHAR2(30); v_get_user VARCHAR2(60) :=
-
Trying to implement variable into a string...not working
Hey guys, I am fiddling with a Cocoa app of mine, and for some really odd reason this is not working. I cannot find a solution, but maybe you will be able to pinpoint what is going on. NSString * studentReply; studentReply = @"%@ says okay.", student
-
MB1B Mvt Type 413 E - GL Account requires an assignment to a CO Object
Hi, We are trying to transfer stock from one sales order to other, system is giving the error " GL Account requires an assignment to a CO Object". Movement type 413 E through MB1B. We are using MTO scenario. The question is that we are giving both t