Create Entity class from view

Hello,
Is it possible to use views in java persistence in the same way as tables (but just for fetching data)?
Thanks in advance.

hi,
before doing this first consider the runtime usage of your appln. Will there be 2 separate appln modules that has its own entity objects..?
creating 2 connections doesnt means that your eos will be used together?
best is to make a single connection to a schema that has access to all tables of both the schema, with proper rights. next you create synonyms with proper access name i.e sch-name.tbl-name
or else you can directly create entity object by this pattern. Right click the model project or any package in it and select create new eo from busniess components menu.
Regards,

Similar Messages

  • Unable to Create Entity Model from existing oracle database

    Hi,
    I am using Visual Studio 2013, .net framework 4.5, entity framework 5.0 and oracle 11g database.
    Issue Description: I need to develop WCF service to exposing the account information which needs to get the data from 20 oracle tables. Trying to create entity model from existing oracle database. first i tried creating just two tables it
    was created but it took more than 30 minutes. then i selected remaining few tables it took more than a days but nothing created just showing spinning the wheel. then i tried with fresh project and selected all the tables but same issue nothing created and
    also there is no error. during this process i checked database query monitoring there is a big sql statement collection tables metadata. i don't know what was wrong the query taking too much time to complete the  process.
    we tried multiple machine and different oracle database all are same issue.
    Sql server database -looks good no issues.
    Any help/tips/ideas welcome to overcome this issue.

    Hi Sakthimp,
    Welcome to MSDN forum.
    Your issue is out of support range of VS General Question forum which mainly discusses the usage of Visual Studio IDE such as
    WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
    and Visual Studio Editor.
    Because your issue only occurred with oracle database, moreover Oracle developed the Entity Framework for Oracle itself, I suggest that you can consult your issue on Oracle forum/community:
    you will get better solution and support there.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to access a Java class from view controller?

    Hi All,
    I have created a Test.java class file from Navigator view under
    Src --> Packages --> com.sap.MyProject.
    When I try to access the Test class from view controller,
    I getting this error "Test cannot be resolved or is not a type".
    How do I fix this?
    Thanks
    Sundar

    Hi,
    I have created a Test.java class file from Navigator view under
    Src --> Packages --> com.sap.MyProject.
    After this you can goto the context of your View and define the VA goto the type of VA and click on the right side button and go to java native type and type your java file name click you name .
    that means the jave file s assigned to VA.
    U can utilize thrut that VA.
    Thanks,
    Lohi.

  • EJB 3.0: CMP Entity bean from view

    Hi,
    I have created an entity bean from a database view.
    I don't have a good filed to use as id in my view. So I want to generate the id in my entity bean.
    How can I do this ?
    Thanks

    Hi,
    I didn't get your question.
    CMP is something, which can be done by hand.
    So maybe it is better, to do it manually.
    Bea has some workaround, I am sure.
    Maybe it is something with deployment descriptors, which
    have to be configured to the underlying database.
    Sorry for my stupid first answer.
    Volker.

  • Creating Entity within a view

    I have a View with two entities, Person and Address. The first has a foreign key identifying the Address entity and the view works fine. The reason for two Entities is that Addresses may be owned by other Entities too.
    I want to write a method on the ViewPersonImpl that creates a new EntityAddress and links the PersonEntity to it. This represents a change of address of the Person.
    It seems I have to do the following.
    1) Create EntityPersonDefImpl.java
    2) Write a public createInstance method that just calls EntityDefImpl.createInstance().
    3) In ViewPersonImpl.changeAddress(), call this method and set the Person.AddressId attribute to the appropriate value from the returned Entity.
    My first question is why I have to go to such lengths (steps 1 & 2) when I expected to only have to do step 3. Put another way, why is EntityDefImpl.createInstance() protected?
    Secondly, after setting the AddressId, the method getEntityAddress() still returns the original EntityAddress. What more must I do to make this method return the new EntityAddress?
    Code snippet:
    EntityAddressesImpl lNewAddress = getEntityAddresses().cloneIt();
    setAddressId(lNewAddress.getId());
    if (lNewAddress != getEntityAddresses())
    {   System.err.println("Entity not seen " + lNewAddress + ", " + getEntityAddresses());
    Output:
    Entity not seen Entity [oracle.jbo.Key[2187 ]], Entity [oracle.jbo.Key[2152 ]]
    I've discovered that I can execute this code:
    setEntity(1, lNewAddress);
    Then everything seems to be plumbed correctly, but I must know that EntityAddresses is Entity #1. There is no setEntityAddresses(EntityAddressesImpl) method analagous to getEntityAddresses().
    Is this the correct solution?
    How do I discover an Entity's index?
    Tony.

    Hi,
    A view is just a query stored in Oracle, you cannot have a index on a view, you can create on the table on which the view is based.
    thanks

  • Fastest way to create child class from parent?

    As the subject states, what do you folks find is fastest when creating child classes directly from the parent? (esp. when the parent is in a lvlib) I thought I'd post up and ask because the fastest way I've found to get working takes a few steps.
    Any suggestions ae appreciatized!
    -pat

    Thanks for the quick response Ben!
    Yea, I apologize, in your response I realize my OP was more than vague haha (it hapens when you get used to your own way of doing things I guess huh)- I'm trying to create a child from a parent so that it has all of the methods that the parent has.
    In order to do so I currently have to open and close LV a few times during my current process so that vi's in memory dont get mixed up- Currently I save a copy of the parent class in a sub dir of where it is saved, close out of LV, open the new 'copy of parent.lvclass', save as>>rename 'child class.lvclass', close LV, and open up the project to 'add file', then right click>>properties>>inheritance.
    Is this the only way to do this?
    Thanks again!
    -pat
    p.s. I'm tempted to steal your cell phone sig, hope you dont mind haha good stuff!

  • How to create 3 Classes from one

    Hello,
    I have one Databeseconnection class. But I would like creating 3 classes so that I have one connection class, one insert class and one select class.
    How Can I do It? Could you help me, please?
    package Test; import java.util.*; import java.sql.*; public class JavaDBTest { public static void main(String[] args){ Connection dbconn = null; Statement stmt=null; String mysqlHost = "localhost"; String mysqlDB = "dbname"; String mysqlUser = "root"; String mysqlPass = ""; int id=0; //open connection try { if(dbconn == null || dbconn.isClosed()) { // Load the JDBC driver. Class.forName("com.mysql.jdbc.Driver"); DriverManager.setLoginTimeout(10); // Establish the connection to the database. dbconn = DriverManager.getConnection("jdbc:mysql://" + mysqlHost + "/" + mysqlDB, mysqlUser, mysqlPass); stmt = dbconn.createStatement(); } } catch (Exception e) { System.out.println(e); } //Statements try { stmt.executeUpdate("INSERT INTO tabelename (RFID_Tagid,pub_type_id,Owner_id,Standort_id,user_id,year,actualyear,title,bibtex_id,report_type,survey,mark,series,volume,publisher,location,issn,isbn,firstpage,lastpage,journal,booktitle,number,institution,address,chapter,edition,howpublished,month,organization,school,note,abstract,url,doi,crossref,namekey,userfields,specialchars,cleanjournal,cleantitle,cleanauthor,read_access_level,edit_access_level,derived_read_access_level,derived_edit_access_level,pages,Signatur,roles_ids,entleihbarFuer,vormerkbarFuer,SichtbarFuer) VALUES (1,2,3,4,5,1998,2010,'ichbin titel','1','r',3,2,'s','volume','publis','location','issn','isbn','firstpage','lastpage','journal','booktitle','number','institution','address','chapter','edition','howpublished','month','organisation','school','note','abstract','url','doi','crossref','namekey','userfields',true,'cleanjournal','cleantitle','cleanautor',1,3,4,5,'pages','signatur','roles-ids','entleihbar','vorm','sichtb');"); ResultSet rs = stmt.executeQuery("SELECT LAST_INSERT_ID();"); rs.next(); id = rs.getInt(1); } catch (Exception e) { System.out.println(e); } System.out.println(id+""); try { ResultSet rs = stmt.executeQuery("SELECT * FROM tablename;"); while(rs.next()) { System.out.println(Integer.valueOf(rs.getString(1))); System.out.println(rs.getString(2)); System.out.println(rs.getString(3)); } } catch (Exception e) { System.out.println(e); } //close connection try { dbconn.close(); dbconn = null; } catch (Exception e) { System.out.println(e); } } }

    suneclipse wrote:
    Could you please write in java code?no doubt. So can anyone with a grain of common sense.
    That's not to say we're going to do your work for you.

  • Trouble on Create Entity Object from AS400/DB2 version 5 rev 4

    Hi, hope any1 can help..
    I using jt400.jar (com.ibm.as400.access.AS400JDBCDriver) with
    jdbc url : jdbc:as400://host
    to create connection.
    However, when I try to create entity or business component based on the connection, it gave me "Attribute list error":
    java.lang.NullPointerException
         at oracle.jbo.dt.jdevx.db.DBApiUtil.fillAttributeListInternal2(DBApiUtil.java:1249)
         at oracle.jbo.dt.objects.JboDBUtil.fillAttributeListInternal2(JboDBUtil.java:87)
         at oracle.jbo.dt.objects.JboUtil.fillAttributeListInternal2(JboUtil.java:2749)
         at oracle.jbo.dt.objects.JboUtil.fillAttributeListWithException(JboUtil.java:2711)
         at oracle.jbo.dt.objects.JboUtil.fillAttributeListInternal(JboUtil.java:2687)
         at oracle.jbo.dt.objects.JboUtil.fillAttributeList(JboUtil.java:2626)
         at oracle.jbo.dt.objects.JboUtil.fillAttributeList(JboUtil.java:1059)
         at oracle.jbo.dt.ui.main.DtuUtil.createEntityFromThread(DtuUtil.java:562)
         at oracle.jbo.dt.ui.pkg.PKEntityThread.createEntity(PKEntityThread.java:898)
         at oracle.jbo.dt.ui.pkg.PKEntityThread.createEntity(PKEntityThread.java:719)
         at oracle.jbo.dt.ui.pkg.PKEntityThread.doEntityViewCreation(PKEntityThread.java:537)
         at oracle.jbo.dt.ui.pkg.PKEntityThread.createObjects(PKEntityThread.java:470)
         at oracle.jbo.dt.jdevx.ui.pkg.XPKComponentWizardEntityThread.createObjects(XPKComponentWizard.java:491)
         at oracle.jbo.dt.ui.pkg.PKEntityThread.run(PKEntityThread.java:447)
         at oracle.ide.dialogs.ProgressBar.run(ProgressBar.java:655)
         at java.lang.Thread.run(Thread.java:662)
    I had refer other posts, but i might miss out some important piece. Beside, I able to create ViewObject based on sql query. Any1 able to show me some direction..perhaps..thanks

    Thanks ...I tried both SQL92 and db2...and tried both Java & Java Extended for Oracle.. too..I able to connect to the dbase, browse thought the db2 schema n tables, even able to create view object with sql query..just stuck in entity object creation..feel weird n cant find much of documentation on the web to describe this behaviour too..

  • Creating Entity Object from Service Interface - JDeveloper version 11.1.1.3

    In our project, we don't intend to have any JDBC connection to a database and want to create all my entity objects using SDO web services deployed in a remote server. I could create an entity object based on a SDO web service deployed in the standalone WL server successfully. But at the time of Development,when I select ADF Business Component --> Entity Object, it always takes to a screen that prompts for a JDBC connection, if you have no connection defined in the project yet. To bypass this, I need to create a valid connection to a local DB and then I can go the next page that prompts me to to choose service interface and asks for a WSDL URL. How do I get around creating a JDBC connection and create a service interface based data source directly?
    To get around this issue, I created a connection to a local DB by providing a wrong password to make sure that we don't need a valid db connection. The application module (Business Component Browser) works fine when the DB connection is broken. But when I create a JSF page and put the data control there, if we don't have the DB connection established it gives error during deployment.I tried deleting the unused connection, but that gives a lot of errors during deployment. My question is;
    1. How can I create a service interface based data source by-passing the requirement for a connection?
    2. If that's not possible - how can I cleanly delete the JDBC connection and all it's dependencies, so that, it deploys and runs without error

    Frank,
    Thanks for your response.
    I have made some progress in last two days and solved some of the original issues. I deleted the fake JDBC connection from connection.xml that I had to use to go to the second screen that lets me select the WSDL for the service interface. After that, I checked off the "Auto Generate and Synchronize ..." option from Application --> Application Properties --> Deployment. (thanks to Steve Muench's blog post on this subject). After that, I could deploy the JSF page and the page shows up with no problem.
    However, when I try to run the App Module that was created from the WSDL (service interface), it brings up a pop-up with heading "Password Required" that says "Enter the password for" and asks for a user name and password (not sure what they are as they take any value and takes me to the next screen). After that, I can open the View and navigate through it. When i change some data and try to commit - it makes the change to the data and stores in the DB but gives an error saying "(oracle.jbo.NotConnectedException) JBO-25200: Application module is not connected to a database."
    Also, the data control created from the service interface had operations called Commit and Rollback. I used the Commit on JSF page and that does the exact same thing too. Any idea?
    Also - when we consume a SDO WSDL to create the entity object - how can we access the SOAP Request and Response objects? We have to implement WS-Security by instrumenting the SOAP header and need to get a handle on that. Is there a mechanism similar to JAX-WS handler framework for SDO?
    R,
    Chandan

  • Help on creating Java Classes from WSDL in JDev 10.1.3

    Hi all,
    I am creating Java Web Service Class in JDev 10.1.3 based on my WSDL file, but I am getting a JAVA class for each Element in my WSDL, and each class has its own methods. But what I need is to have Only ONE Class with the Elements wrapped as methods in this class (this is the result I had when I was using JDev 9.0.2 but I had Datatype conversion issue, so now I am trying to do the same with JDev 10.1.3)
    My WSDL file is as follows:
    - <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
    - <s:element name="Connect">
    <s:complexType />
    </s:element>
    - <s:element name="ConnectResponse">
    <s:complexType />
    </s:element>
    - <s:element name="Disconnect">
    <s:complexType />
    </s:element>
    - <s:element name="DisconnectResponse">
    <s:complexType />
    </s:element>
    - <s:element name="GetPIValue">
    - <s:complexType>
    - <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="piTAG" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="piTS" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    - <s:element name="GetPIValueResponse">
    - <s:complexType>
    - <s:sequence>
    <s:element minOccurs="1" maxOccurs="1" name="GetPIValueResult" type="s:double" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="double" type="s:double" />
    </s:schema>
    When creating the JAVA Classes in JDev, I am getting the following:
    Connect.java
    ConnectResponse.java
    Disconnect.java
    DisconnectResponse.java
    GetPIValue.java
    GetPIValueResponse.java
    But what I actually need is to have a Method GetPiValue that should take in 2 paramters as strings and return a Double Value. Now the GetPIValue looks like this:
    package ConnecttoPI;
    public class GetPIValue implements java.io.Serializable {
    protected java.lang.String piTAG;
    protected java.lang.String piTS;
    public GetPIValue() {
    public java.lang.String getPiTAG() {
    return piTAG;
    public void setPiTAG(java.lang.String piTAG) {
    this.piTAG = piTAG;
    public java.lang.String getPiTS() {
    return piTS;
    public void setPiTS(java.lang.String piTS) {
    this.piTS = piTS;
    With this class Generated, how can I call the Class Methods and get the response?
    Do I have to change the way/settings when I am creating the Java Classes using the Wizard? Why is the Wrapper wrapping the WSDL in multiple classes?
    Thanks to anyone's help in advance.
    Regards,
    Baz

    An update to my previous Post:
    After creating the Web Service proxy based on my WSDL file, I tested the Web Service Call from the Java Class (Service1SoapClient) and it is properly Calling the Web Service passing in String Paramters (2 Strings) and returning a Double Datatype. The Class is as below:
    package project1.proxy;
    import oracle.webservices.transport.ClientTransport;
    import oracle.webservices.OracleStub;
    import javax.xml.rpc.ServiceFactory;
    import javax.xml.rpc.Stub;
    public class Service1SoapClient {
    private project1.proxy.Service1Soap _port;
    public Service1SoapClient() throws Exception {
    ServiceFactory factory = ServiceFactory.newInstance();
    _port = ((project1.proxy.Service1)factory.loadService(project1.proxy.Service1.class)).getService1Soap();
    * @param args
    public static void main(String[] args) {
    try {
    project1.proxy.Service1SoapClient myPort = new project1.proxy.Service1SoapClient();
    System.out.println("calling " + myPort.getEndpoint());
    // Add your own code here
    double testResponse = myPort.getPIValue("A3LI004.pv", "9/9/2007 9:20 am");
    System.out.println("response from PI " + testResponse);
    } catch (Exception ex) {
    ex.printStackTrace();
    * delegate all operations to the underlying implementation class.
    Connect to PI Server
    public void connect() throws java.rmi.RemoteException {
    _port.connect();
    Disconnect from PI Server
    public void disconnect() throws java.rmi.RemoteException {
    _port.disconnect();
    Retrieve PI Values
    public double getPIValue(String piTAG, String piTS) throws java.rmi.RemoteException {
    return _port.getPIValue(piTAG, piTS);
    Now I am trying to IMPORT this class into Oracle Forms, but I am getting the following Error:
    Importing Class project1.proxy.Service1SoapClient...
    Exception occurred: java.lang.NoClassDefFoundError: oracle/webservices/transport/ClientTransport
    First, is this the Correct Class that should be Imported into Oracle Forms in order to Trigger the Java Class to Call the Web Service? Why am I getting this Error? I have read that this could be because of my CLASSPATH environment variable or the J2SE version compiling the java class???
    Can someone help me to IMPORT this Java Class properly into Oracle Forms and Call the Web Service?
    Many thanks for your help,
    Baz

  • Creating custom classes from a more complex DTD

    Are there any examples of creating more complex custom document types? The sample in the dev. guide and the xml syntax are a good start but not enough.
    If anyone has an example from their own work, I'd appreciate it. You can send them to [email protected]
    Thanks!

    I'm having trouble gaining access to the content of those objects within a multilevel tree structure once the XML file has been loaded into the database. Those attributes off root via an editing tool or jsp/bean are rendered; however, the branched object structures are not. Instead the following is in its place: <MYClASSOBJECT2 RefType="ID">7265<!--ClassObject: MYClASSOBJECT2--><!--Name:Null--></MYClASSOBJECT2>
    Here is some background. All custom classes have been successfully loaded into iFS, including the branching objects, which have been entered as extensions of Document as well as the associated ClassDomain entries. I've read Mark's PencilObject entry of June 23, but I continue to get undesired results. Currently, I am using SimpleXMLRender and am inclined to believe that I will need to customize the renderer for it to recognize the deep structures within my XML. Can you shed any light on my situation? In a nutshell, how do I gain access to the content within my multilevel XML?

  • How to Remove the Entity usage from View object at runtime

    Hi,
    A ViewObject can be created dynamically based on the Existing ViewObject Defintions. The newly created dynamic ViewObject will have all the defintion including Attributes, its structure along wtih Entity usage of the existing ViewObject definition.
    My requirement is i don't want to have the Entity usage alone whereas Remaining structure need to be retained.
    Can any body suggest on how to do it.
    regards.

    Hi,
    design time or runtime? At designtime, have you tried to just remove the entity reference? Given the disadvantage of removing the entity (and the changed behavior associated with it) what is the use case for which you want to disable the entity reference?
    Frank

  • Can I create a snapshot from view?

    I am using Oracle 9iLite Server for my application on Pocket PC 2002 based PDA. Because my oracle center database table is very large for creating a snapshot and it will take a long time to sync. I want to create a view based the large table then using the view to create the snapshot. Can i succeed in doing it?

    A snapshot or view is also not ordered.
    And I don't think that you only want to have each time the same
    70 lines, or ?
    Thomas

  • Create Entity Object from Service interface?

    An option for creating an EO is to use a "Business Components service interface". Is this referring to a App Mod service interface, web service WSDL or what? Am having a real problem attempting to decipher this and cannot find any mention of how to do this in the doc. Any help is appreciated.
    Thanks for a quick response - or for that matter any response - Casey

    Additional info:
    Created a simple AM - Emp and Dept for VOs in the data model. Added a simple service method to the AM - input String, return String and is exposed via the client interface.
    Followed the following steps as per the doc (Fusion Developer's Guide for Oracle Application Development Framework) to create a service interface:
    To create the web service:
    +1. In the Application Navigator, right-click the application module and choose Open+
    AppModule.
    +2. In the application module overview editor, select Service Interface from the+
    navigation list.
    Problem - I do not have a 'Service Interface' in the navigation list.
    So how do I create a service interface - what have I missed?????
    BTW - Using JDev 11.1.1.0.1
    Thanks - Casey

  • Creating Z transaction from view cluster

    Hi All!
    I had created view cluster using SE54.This view cluster contains check tables to be maintained by the user.
    Now my problem is how to attach these view cluster to a Z transaction through SE93.In production se54 is not available and i have to attach this view cluster to the Z transaction so that selected users are restricted to use this view cluster.
    Regards
    Praneeth
    Points will be rewarded
    Message was edited by: Praneeth kumar

    Hi Rusidar,
    You can actually use the transaction code SE93 to launch a view cluster. Say you have a view cluster: MYVC. Here is how you can create a transaction code to display this:
    1. Execute transaction SE93.
    2. Enter the desired transaction code in the input field, say MY_TCODE.
    3. Click on 'Create' button. A 'Create Transaction' popup will open. In this popup, enter the short text for this code and choose the last radio among all radios which says "Transactions with Parameters ('parameter transaction')" and click 'OK'.
    4. In the resulting screen, enter 'SM34' as Default Value for transaction. Then add the following two entries under 'Default Values' section (this section is located towards the end of the screen):
    Name of screen field Value
    SHOW                     X  (means simulate click on 'Display' button
    VCLDIR-VCLNAME   MYVC ( This is the technical element that corresponds to the input field in the screen of transaction sm34).
    5. Check the checkbox 'Skip Initial Screen'.
    6. Save the transaction code.
    Try running the code. If your cluster view already works via sm34, it should execute....
    Cheers....
    Regards,
    Shiromani
    Edited by: Shiromani Raj Sharma on Dec 26, 2007 10:33 AM

Maybe you are looking for

  • ITunes 9.0 home sharing with one computer with two accounts

    is it possible to use the home share option using only one computer that has two iTunes accounts on it? i used the same user account for both accounts as stated but can not access the files. any info is appreciated.

  • File Browse

    Hi, I have a problem with file browser item. I have a table with a BLOB column (and another column). I have a region based on this table. I have a file browse item based on blob item. I use this sintax on item source: COLUMN_PHOTO:::::: When I save m

  • Uploading .wav file from ITunes to IPod as mp3

    All the cd's I have added to Itunes are in the .wav format to achieve highest quality for playing on my pc or other external systems. I would like to download these file to my Ipod as MP3, but cannot seem to find a way to download and convert without

  • Default settings

    Hi Gurus Please help me in doing default seetings for Dunning Procedure and Terms of Payments while creating new customer for a specific company code . We want to have specific and same Dunning procedure and Terms of Payment should come automatically

  • [Solved] Strange font problem - after update.

    Hello guys, encountered a strange small font problem on sites with code wrappers like stackoverflow/blogs/jsfiddle. After update. took a look at my font setup all looks good. I've also checked the settings for gtk2/3 and no problems there. INFO: Goog